幾個星期前,我發佈了一個關於此的問題,但沒有得到任何迴應。所以我再次發佈一個更清晰的問題/問題。Ionic 2 - Android發佈版本在啓動屏幕後停留在白屏上
我的問題:
1)我運行:
$ ionic cordova build android --release --prod
2)然後我簽字。
3.)然後我上傳到谷歌播放。
4.)然後我從谷歌播放下載它,應用程序點擊啓動畫面,然後在初始屏幕在較低版本的Android(到目前爲止6.0.0版本以下)關閉後卡在白色屏幕上。
要驗證它是我的應用程序是問題,我使用「超級」模板通過離子cli創建了一個新應用程序。然後我建立,簽署並上傳完全相同的方式。我從谷歌播放下載它,它的工作。我將它製作成了應用程序,包括6.0.0以下的版本。
所以,我的問題是
我怎麼看是什麼原因造成的問題,如果它只是在釋放/生產建設情況?
有沒有方法可以調試?
有沒有已知的功能(管道,面具,模塊等),角度/離子的使用不適用於老版本的Android的舊版本的瀏覽器中可能會導致這種情況嗎?
項目信息:
@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
全球套餐:
Cordova CLI : 7.0.1
本地套餐:
@ionic/app-scripts : 2.1.3
Cordova Platforms : android 6.2.3 ios 4.4.0
Ionic Framework : ionic-angular 3.6.0
系統:
Node : v6.11.0
OS : macOS Sierra
Xcode : Xcode 8.3.3 Build version 8E3004b
ios-deploy : 1.9.1
npm : 3.10.10
配置文件:
<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..?
我的插件(我看到別人造成了由模塊導入類似的問題..?):
<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" />
你是否嘗試過使用本地apk版本的發佈模式而無需通過谷歌播放?你檢查了Android日誌(adb logcat)嗎? – QuickFix
你有沒有找到解決方案..我在生產生成/運行有同樣的問題 – Yasir
我不會稱之爲一個解決方案,但我安裝了Crosswalk插件,它的工作。唯一的缺點是,我注意到它增加了約30mb的包裝尺寸... https://github.com/crosswalk-project/cordova-plugin-crosswalk-webview – Everett