我开发了一个Ionic应用程序,它在Android版本6.0.1(Marshmallow),Android 4.4(KitKat)和Android 7.1(Nougat)以外的Android版本中运行良好。
在启动屏幕加载后显示白屏。我提到了一些链接,但没有运气。这些是我提到的链接:
cli包:(C:\ Users \ ADMIN \ AppData \ Roaming \ npm \ node_modules)
@ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
全球套餐:
cordova (Cordova CLI) : 8.0.0
本地包裹:
Cordova Platforms : android 7.0.0
Ionic Framework : ionic1 1.0.0-rc.2
系统:
Node : v8.11.3
npm : 5.6.0
OS : Windows 10
环境变量:
ANDROID_HOME : not set
其他:
backend : legacy
插入:
config.xml文件
<content src="index.html" />
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<allow-intent href="market:*" />
<preference name="webviewbounce" value="false" />
<preference name="UIWebViewBounce" value="false" />
<preference name="DisallowOverscroll" value="true" />
<preference name="BackupWebStorage" value="none" />
<preference name="SplashMaintainAspectRatio" value="true" />
<preference name="SplashScreenDelay" value="2000" />
<preference name="FadeSplashScreenDuration" value="1000" />
<preference name="SplashScreen" value="screen" />
<preference name="ShowSplashScreenSpinner" value="true" />
<preference name="AutoHideSplashScreen" value="false" />
在app.js中运行函数
.run(function($ionicPlatform, $rootScope, $timeout, $ionicLoading, $ionicPopup, $ionicHistory, $state) {
$ionicPlatform.ready(function() {
navigator.splashscreen.hide();
if (window.Connection) {
if (navigator.connection.type == Connection.NONE) {
var alertPopup = $ionicPopup.alert({
title: 'No Internet Connection!',
template: 'Sorry, no Internet connectivity detected. Please reconnect and Try again.'
});
alertPopup.then(function(res) {
ionic.Platform.exitApp();
});
}
}
if (window.cordova && window.cordova.plugins.Keyboard) {
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
}
if (window.StatusBar) {
StatusBar.styleDefault();
}
});
})
请帮我解决一下这个。我一直在努力解决这个问题。
尝试再次添加您在项目中添加的所有插件。然后再次重建应用程序。