This app requires a webview to work

Hey! Hello everyoe!
I have been using Angular for over 6 years. Now, I’m learning IONIC.
I was running a IONIC-Angular 18 app on my android device, and everything was working correctly.
Then, I updated to angular 19, and it stop working.

This app requires a webview to work.

The first thing that I noticed was that the folder WWW didnt have the index.html. It was inside a subfolder called BROWSER.

I change the capacitor config, to the folder WWW/BROWSER. However, when I upload the code to android, I get this error: this app requires a webview to work.

I couldnt fix it using ChatGPT. Can someone guide me to find the solution?
Thank you guys!

Commands used:

ng build
npx cap sync
ionic capacitor run android

Angular: 19.0.4
… animations, common, compiler, compiler-cli, core, forms
… language-service, platform-browser, platform-browser-dynamic
… router

Package Version

@angular-devkit/architect 0.1900.5
@angular-devkit/build-angular 19.0.5
@angular-devkit/core 19.0.5 (cli-only)
@angular-devkit/schematics 19.0.5
@angular/cli 19.0.5
@schematics/angular 19.0.5
rxjs 7.8.1
typescript 5.6.3
zone.js 0.15.0

@angular/animations”: “^19.0.4”,
@angular/common”: “^19.0.4”,
@angular/compiler”: “^19.0.4”,
@angular/core”: “^19.0.4”,
@angular/forms”: “^19.0.4”,
@angular/platform-browser”: “^19.0.4”,
@angular/platform-browser-dynamic”: “^19.0.4”,
@angular/router”: “^19.0.4”,
@capacitor/android”: “^6.2.0”,
@capacitor/app”: “6.0.2”,
@capacitor/cli”: “^6.2.0”,
@capacitor/core”: “^6.2.0”,
@capacitor/haptics”: “6.0.2”,
@capacitor/ios”: “^6.2.0”,
@capacitor/keyboard”: “6.0.3”,
@capacitor/status-bar”: “6.0.2”,
@capacitor/toast”: “^6.0.3”,
@ionic/angular”: “^8.4.1”,
“bootstrap”: “^5.3.3”,
“capacitor-tts”: “^0.0.2”,
“howler”: “^2.2.4”,
“ionicons”: “^7.2.1”,
“rxjs”: “~7.8.0”,
“swiper”: “^8.4.7”,
“tslib”: “^2.3.0”,
“zone.js”: “~0.15.0”

That message appears when the device doesn’t have a WebView installed or have it disabled in apps.

Hey, Thank you for very much your answer. I have checked the device, and it has WebView installed. I also tried running the app in my Android emulator, where it had been working, and it says the same: it requires WebView.
Do I have any other points to check to determine what is happening?
I also created a project from scratch using Ionic-Angular 19, and it has the same issue.

I got the same exact issue…

Ionic apps still use angular 18, so you updated to 19 yourself, right?
can you provide a sample app?

Hey, how are you?

I noticed that Ionic Angular 19 is not working. What I found is that when the www folder is created, it has a different architecture:

WWW

  • prerendered-routes.json
  • Browser Folder: (Assets, Audio, Icons, etc).

The problem is that Capacitor doesn’t work with this structure. I tried updating the Capacitor config, and it works, but then the mobile phone or the emulator gives us an error: “WebView is required.” However, the app, using the www structure created by Angular 18, works.

const config: CapacitorConfig = {
appId: ‘com.example.app’,
appName: ‘IonicAngularTest’,
webDir: ‘www/browser’
};

Does anyone know how I can avoid the new www folder structure in Angular 19?
Thank you guys!

I had the same issue with Angular 19 and Capacitor. It seems the new folder structure in Angular 19 is causing the problem. You can try changing the angular.json file back to the old structure from Angular 18 or update the webDir path in the Capacitor config to the right folder.