Hello,
I have a strange issue. To reproduce:
- Create a simple “tabs” (ionic start) project with Angular 19 on the latest version.
ionic serve
: works fine. - Add Capacitor:
npm cap add android
ionic build
npx cap sync
- Then, with Android Studio, I deploy to Android and get an error:
"NullInjectorError: No provider for ho!"
If I add "optimization": false
in the configurations of angular.json
:
ionic build
npx cap sync
Then, with Android Studio, I deploy to Android: it works fine.
It seems like “uglification” causes an issue with Angular 19 in combination with Ionic and Capacitor.
If I downgrade to Angular 18, the problem disappears.
Did I miss something?
Can anyone let me know if they’re experiencing the same issue?