1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

Ionic Angular Cordova App Not Launching on Android 10/11: Stuck After Splash Screen and...

Discussão em 'Angular' iniciado por IAM5K, Junho 5, 2025.

  1. IAM5K

    IAM5K Guest

    I'm working on an Ionic Angular + Cordova mobile app that needs to be built and tested specifically on Android 10 and 11 for dynamic security assessment using MOBSF. The app builds successfully after multiple tries, but when I install and run it on an emulator or device running Android 10 or 11, it gets stuck after the splash screen and does not load the main content.

    Environment:

    • Ionic Framework (Angular)
    • Cordova
    • Android 10/11
    • Testing on emulator and physical device
    • Using Android Studio for installation & Logcat logs
    Issue:


    After installing and launching the app, I get stuck on the splash screen. The logs in Android Studio show the following error:

    Exception when retrieving package:example.myapp
    android.content.pm.PackageManager$NameNotFoundException: example.myapp
    at android.app.ApplicationPackageManager.getPackageInfoAsUser(ApplicationPackageManager.java:206)
    at android.app.ApplicationPackageManager.getPackageInfo(ApplicationPackageManager.java:178)
    ...
    Invalidating LocalCallingIdentity cache for package example.myapp. Reason: package android.intent.action.PACKAGE_REMOVED
    O received Intent { act=android.intent.action.PACKAGE_REMOVED dat=package:example.myapp flg=0x4000010 (has extras) }


    It seems like the system removes or fails to recognize the package shortly after launch.

    Then this appears:

    Displayed example.myapp/.MainActivity: +957ms
    onPageDidNavigate(https://localhost/index.html)
    postMessage: onPageStarted
    java.io.FileNotFoundException: www/js/plugins/LaunchMyApp.js
    at android.content.res.AssetManager.nativeOpenAsset(Native Method)
    at android.content.res.AssetManager.open(AssetManager.java:874)
    at org.apache.cordova.engine.SystemWebViewClient.lambda$new$0$SystemWebViewClient(SystemWebViewClient.java:95)
    at org.apache.cordova.engine.-$$Lambda$SystemWebViewClient$sl_w10kTka227lJmCz64A09UKvs.handle(Unknown Source:4)
    at androidx.webkit.WebViewAssetLoader.shouldInterceptRequest(WebViewAssetLoader.java:566)
    at org.apache.cordova.engine.SystemWebViewClient.shouldInterceptRequest(SystemWebViewClient.java:423)
    at Rr.a(chromium-TrichromeWebViewGoogle.apk-stable-410410681:16)
    at org.chromium.android_webview.AwContentsBackgroundThreadClient.shouldInterceptRequestFromNative(chromium-TrichromeWebViewGoogle.apk-stable-410410681:2)
    www/js/plugins/LaunchMyApp.js


    And finally:

    [INFO:CONSOLE(1)] "Could not find cordova.js script tag. Plugin loading may fail.", source: https://localhost/cordova.7a8c8f9cc4577b7c.js (1)

    What I’ve Tried:

    • Ensured cordova.js is included in index.html.
    • Verified all plugins are properly installed via cordova plugin list.
    • Removed and re-added Android platform using ionic cordova platform rm android && ionic cordova platform add android.
    • Checked if the file www/js/plugins/LaunchMyApp.js exists and found that it is not being generated. Maybe something is missing. Whole js folder is not being added to the www on building the app.
    • cordova.js is found in www/cordova.js.
    • Updated WebView and Chrome on emulator and device.
    • Verified correct config.xml and AndroidManifest.xml setup.
    Notes:

    • I suspect this could be related to missing files during build, or plugin compatibility issues with Android 10/11.
    • The error about cordova.js not found could mean the asset loader isn't properly serving the web content.
    • The app does work on newer Android versions like Android 12+, but for security testing purposes, I am required to use Android 10 or 11.
    Questions:

    1. Why is the app getting removed or failing to be recognized by PackageManager after launch on Android 10/11?
    2. What could cause the splash screen to freeze and the main app content not to load?
    3. How do I resolve the missing LaunchMyApp.js and cordova.js errors, even though cordova.js is included via script tag?
    4. Is there any Android 10/11 specific Cordova plugin or build issue I might be overlooking?

    Any help or guidance would be greatly appreciated! Please feel free to ask questions if that can help.

    Continue reading...

Compartilhe esta Página