离子cordova构建android卡在闪屏 [英] Ionic cordova build android stuck at splashscreen

查看:392
本文介绍了离子cordova构建android卡在闪屏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我的应用程序可以在网络上正常运行,现在我想构建android apk文件并对其进行测试,所以我可以这样做:

so I have my app working without errors on web and now I want build android apk file and test it, so I do :

ionic cordova platform add android
ionic cordova build android

在这两个之后我没有犯错.

I get no erros after these two.

然后我去android studio并运行android项目,构建成功. 启动我的应用程序后,我看到离子飞溅屏仅旋转1秒钟,然后他停止了,就这样.卡在启动画面上.

Then I go to the android studio and run android project, build succefull. After I launch my app, i see ionic splashscreen only spinning for 1 second and after that he stops, thats it. Stuck at splashscreen.

离子信息:

Ionic:

   ionic (Ionic CLI)  : 4.1.1 (C:\Users\Andrejus\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.2.0

Cordova:

   cordova (Cordova CLI) : 8.0.0
   Cordova Platforms     : android 7.0.0
   Cordova Plugins       : not available

System:

   NodeJS : v8.11.1 (C:\Program Files\nodejs\node.exe)
   npm    : 5.6.0
   OS     : Windows 10

插件列表:

com.unarin.cordova.beacon 3.7.0 "Proximity Beacon Plugin"
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-facebook4 2.3.0 "Facebook Connect"
cordova-plugin-file 6.0.1 "File"
cordova-plugin-geolocation 4.0.1 "Geolocation"
cordova-plugin-ionic 4.2.0 "IonicCordova"
cordova-plugin-ionic-webview 2.1.0 "cordova-plugin-ionic-webview"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"
cordova-plugin-whitelist 1.3.3 "Whitelist"

在android studio中,我总是会收到此错误:

In android studio I always get this error :

09-11 15:41:11.427 6218-6277/com.port4you.app D/SERVER: Handling local request: http://localhost:8080/assets/icon/favicon.ico
09-11 15:41:11.435 6218-6218/com.port4you.app D/CordovaWebViewImpl: onPageFinished(http://localhost:8080/)
09-11 15:41:11.459 6218-6218/com.port4you.app D/SystemWebChromeClient: http://localhost:8080/build/polyfills.js: Line 3 : Unhandled Promise rejection:
09-11 15:41:11.459 6218-6218/com.port4you.app I/chromium: [INFO:CONSOLE(3)] "Unhandled Promise rejection:", source: http://localhost:8080/build/polyfills.js (3)
09-11 15:41:11.485 1938-2864/system_process E/memtrack: Couldn't load memtrack module
09-11 15:41:11.485 1938-2864/system_process W/android.os.Debug: failed to get memory consumption info: -1
09-11 15:41:15.188 1938-1956/system_process E/memtrack: Couldn't load memtrack module
09-11 15:41:15.188 1938-1956/system_process W/android.os.Debug: failed to get memory consumption info: -1
09-11 15:41:15.201 1938-1956/system_process E/memtrack: Couldn't load memtrack module
09-11 15:41:15.201 1938-1956/system_process W/android.os.Debug: failed to get memory consumption info: -1

此错误每4-5秒:

09-11 15:41:15.201 1938-1956/system_process E/memtrack: Couldn't load memtrack module
09-11 15:41:15.201 1938-1956/system_process W/android.os.Debug: failed to get memory consumption info: -1

运行错误:

D/SERVER: Handling local request: http://localhost:8080/assets/icon/favicon.ico
D/SystemWebChromeClient: http://localhost:8080/build/polyfills.js: Line 3 : Unhandled Promise rejection:
I/chromium: [INFO:CONSOLE(3)] "Unhandled Promise rejection:", source: http://localhost:8080/build/polyfills.js (3)
W/com.unarin.beacon: WARNING did not receive delegate ready callback from DOM after 30 seconds!
D/SystemWebChromeClient: : Line 1 : WARNING did not receive delegate ready callback from DOM after 30 seconds!
I/chromium: [INFO:CONSOLE(1)] "WARNING did not receive delegate ready callback from DOM after 30 seconds!", source:  (1)
D/CordovaActivity: Paused the activity.
W/com.facebook.appevents.AppEventsLogger: deactivateApp events are being logged automatically. There's no need to call deactivateApp, this is safe to remove.
D/EGL_emulation: eglMakeCurrent: 0x7566c1c5dba0: ver 3 1 (tinfo 0x7566d142bde0)
D/CordovaActivity: Stopped the activity.
D/CordovaActivity: CordovaActivity.onDestroy()
W/BeaconManager: This device does not support bluetooth LE.
                 Method invocation will be ignored.
Application terminated.

console.error:

console.error :

推荐答案

打开Chrome并转到chrome://inspect/#devices

Open Chrome and go to chrome://inspect/#devices

然后检查您的远程设备并检查控制台选项卡.您可能会遇到插件问题.

Then inspect your remote device and check console tab. You're probably facing issues with plugins.

您也可以使用

ionic cordova run android -c

这样,您可以在命令中检查控制台.

This way you can check console on your command.

这篇关于离子cordova构建android卡在闪屏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆