简体   繁体   中英

Ionic 2 - Android release build stuck on white screen after splash screen

I posted a question about this a couple weeks ago but got no response. So Im posting again with a clearer issue/question.

My issue:

1.) I run:

    $ ionic cordova build android --release --prod

2.) Then I sign it.

3.) Then I upload to google play.

4.) Then I download it from google play and the app hits the splash screen, then gets stuck on a white screen after the splash screen closes on lower versions of android (So far anything under version 6.0.0).

To verify that it is my app that is the issue, I created a new app through the ionic cli using the "super" template. Then I built, signed, and uploaded it all the exact same way. I downloaded it from google play, and it worked. I made it into the app, including versions lower then 6.0.0.

So, my question is

  • How do I see what is causing the issue if it only happens in a release/production build?

  • Is there a way to debug?

  • Are there known functions (pipes, masks, modules, etc...) that angular/ionic uses that don't work in older browsers found in older versions of android that could be causing this?

Project information:

@ionic/cli-plugin-cordova       : 1.6.1
@ionic/cli-plugin-ionic-angular : 1.4.1
@ionic/cli-utils                : 1.7.0
ionic (Ionic CLI)               : 3.7.0

global packages:

Cordova CLI : 7.0.1 

local packages:

@ionic/app-scripts : 2.1.3
Cordova Platforms  : android 6.2.3 ios 4.4.0
Ionic Framework    : ionic-angular 3.6.0

System:

Node       : v6.11.0
OS         : macOS Sierra
Xcode      : Xcode 8.3.3 Build version 8E3004b 
ios-deploy : 1.9.1 
npm        : 3.10.10 

Config file:

<preference name="android-minSdkVersion" value="16" /> // This is the same as the default value generated by ionic-cli

// I use the hide() function in platform.ready() of my app.component to hide the splash screen. Did the same in the test generated app. Shouldnt be the issue.
<preference name="SplashMaintainAspectRatio" value="true" />
<preference name="FadeSplashScreenDuration" value="500" />
<preference name="SplashShowOnlyFirstTime" value="false" />
<preference name="AutoHideSplashScreen" value="false" />
<preference name="SplashScreen" value="screen" />
<preference name="SplashScreenDelay" value="30000" /> // Arbitrary time. platform.ready() should be called way before this. 
<preference name="loadUrlTimeoutValue" value="700000" /> // Added this because it was recommended for larger app sizes..?

My Plugins (I saw that someone else had a similar issue caused by a module import..?):

<plugin name="cordova-plugin-console" spec="^1.0.5" />
<plugin name="cordova-plugin-contacts" spec="^2.3.1" />
<plugin name="cordova-plugin-device" spec="^1.1.4" />
<plugin name="cordova-plugin-fingerprint-aio" spec="^1.2.1" />
<plugin name="cordova-plugin-geolocation" spec="^2.4.3">
    <variable name="GEOLOCATION_USAGE_DESCRIPTION" value=" " />
</plugin>
<plugin name="cordova-plugin-googlemaps" spec="^1.4.3">
    <variable name="API_KEY_FOR_ANDROID" value="AIzaSyBbYqJI-CZfV8_Zmj3laEGMbHsQenYo3V4" />
    <variable name="API_KEY_FOR_IOS" value="AIzaSyBbYqJI-CZfV8_Zmj3laEGMbHsQenYo3V4" />
    <variable name="NSLOCATIONWHENINUSEUSAGEDESCRIPTION" value="Show your location on the map" />
    <variable name="NSLOCATIONALWAYSUSAGEDESCRIPTION" value="Trace your location on the map" />
</plugin>
<plugin name="cordova-plugin-http" spec="^1.2.0" />
<plugin name="cordova-plugin-inappbrowser" spec="^1.7.1" />
<plugin name="cordova-plugin-nativegeocoder" spec="^1.0.2" />
<plugin name="cordova-plugin-nativestorage" spec="^2.2.2" />
<plugin name="cordova-plugin-screen-orientation" spec="^1.4.3" />
<plugin name="cordova-plugin-secure-storage" spec="^2.6.8" />
<plugin name="cordova-plugin-splashscreen" spec="^4.0.3" />
<plugin name="cordova-plugin-statusbar" spec="^2.2.2" />
<plugin name="cordova-plugin-whitelist" spec="^1.3.1" />
<plugin name="cordova-sqlite-storage" spec="^2.0.4" />
<plugin name="ionic-plugin-deploy" spec="^0.6.7" />
<plugin name="ionic-plugin-keyboard" spec="^2.2.1" />
<plugin name="uk.co.workingedge.phonegap.plugin.launchnavigator" spec="^3.2.2" />

I ended up removing android and iOS platforms, reinstalling them, and installing crosswalk again. Not 100% sure if it was crosswalk that fixed it It could have been some small code change I made.

Generally, when the loading screen is infinite, it's an issue with your code.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM