在IONIC3中启动屏幕后卡在Android上运行

时间:2018-08-05 00:58:18

标签: android typescript ionic-framework ionic3

这个问题困扰着我。事情是IONIC 3中的这个项目,我从现在开始已经有一段时间了,在浏览器(“离子服务”)上一切正常,但是由于某种原因,如果我使用命令在movile(ANDROID)上运行

ionic cordova run android

应用程序在显示初始画面后停留在我的index.html上

这是我来自AndroidStudio logcat的输出控制台

8-04 15:57:18.207 7673-7673/chess.pidoweb I/chromium: [INFO:CONSOLE(11)] "The key "viewport-fit" is not recognized and ignored.", source: file:///android_asset/www/index.html (11)
08-04 15:57:18.981 7673-7673/chess.pidoweb D/JsMessageQueue: Set native->JS mode to EvalBridgeMode
08-04 15:57:19.670 7673-7673/chess.pidoweb W/zygote64: Attempt to remove non-JNI local reference, dumping thread
08-04 15:57:24.065 7673-7673/chess.pidoweb I/chromium: [INFO:CONSOLE(190)] "Uncaught SyntaxError: Unexpected identifier", source: file:///android_asset/www/build/main.js (190)
08-04 15:57:24.086 7673-7673/chess.pidoweb D/XWalkCordovaUiClient: onPageLoadStopped(file:///android_asset/www/index.html)
08-04 15:57:24.087 7673-7673/chess.pidoweb D/CordovaWebViewImpl: onPageFinished(file:///android_asset/www/index.html)
08-04 15:57:24.091 7673-7673/chess.pidoweb I/chromium: [INFO:CONSOLE(1218)] "deviceready has not fired after 5 seconds.", source: file:///android_asset/www/cordova.js (1218)

config.xml

<?xml version='1.0' encoding='utf-8'?>
<widget id="chess.pidoweb" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <name>Pido IONIC</name>
    <description>""</description>
    <author email="hi@ionicframework" href="http://ionicframework.com/" />
    <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-navigation href="http://localhost:8100/*" />
    <allow-navigation href="http://*/*" />
    <allow-navigation href="tel:*" />
    <allow-navigation href="mailto:*" />
    <preference name="loadUrlTimeoutValue" value="700000" />
    <preference name="orientation" value="default" />
    <preference name="ScrollEnabled" value="false" />
    <preference name="StatusBarStyle" value="default" />
    <preference name="BackupWebStorage" value="none" />
    <preference name="android-minSdkVersion" value="19" />
    <preference name="SplashMaintainAspectRatio" value="true" />
    <preference name="FadeSplashScreenDuration" value="300" />
    <preference name="SplashShowOnlyFirstTime" value="false" />
    <preference name="SplashScreen" value="screen" />
    <preference name="SplashScreenDelay" value="3000" />
    <universal-links>
        <host name="https://n3q8p.app.goo.gl/jdXk" scheme="https" />
        <host name="AUTH_DOMAIN" scheme="https">
            <path url="/__/auth/callback" />
        </host>
    </universal-links>
    <platform name="android">
        <allow-intent href="market:*" />
        <icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
        <icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" />
        <icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" />
        <icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" />
        <icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" />
        <icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
        <icon src="resources/android/icon/drawable-xhdpi-icon.png" />
        <splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" />
        <splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" />
        <splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" />
        <splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
        <splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
        <splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
    </platform>
    <platform name="ios">
        <allow-intent href="itms:*" />
        <allow-intent href="itms-apps:*" />
        <icon height="57" src="resources/ios/icon/icon.png" width="57" />
        <icon height="114" src="resources/ios/icon/icon@2x.png" width="114" />
        <icon height="40" src="resources/ios/icon/icon-40.png" width="40" />
        <icon height="80" src="resources/ios/icon/icon-40@2x.png" width="80" />
        <icon height="120" src="resources/ios/icon/icon-40@3x.png" width="120" />
        <icon height="50" src="resources/ios/icon/icon-50.png" width="50" />
        <icon height="100" src="resources/ios/icon/icon-50@2x.png" width="100" />
        <icon height="60" src="resources/ios/icon/icon-60.png" width="60" />
        <icon height="120" src="resources/ios/icon/icon-60@2x.png" width="120" />
        <icon height="180" src="resources/ios/icon/icon-60@3x.png" width="180" />
        <icon height="72" src="resources/ios/icon/icon-72.png" width="72" />
        <icon height="144" src="resources/ios/icon/icon-72@2x.png" width="144" />
        <icon height="76" src="resources/ios/icon/icon-76.png" width="76" />
        <icon height="152" src="resources/ios/icon/icon-76@2x.png" width="152" />
        <icon height="167" src="resources/ios/icon/icon-83.5@2x.png" width="167" />
        <icon height="29" src="resources/ios/icon/icon-small.png" width="29" />
        <icon height="58" src="resources/ios/icon/icon-small@2x.png" width="58" />
        <icon height="87" src="resources/ios/icon/icon-small@3x.png" width="87" />
        <splash height="1136" src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" />
        <splash height="1334" src="resources/ios/splash/Default-667h.png" width="750" />
        <splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" />
        <splash height="2048" src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" />
        <splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" />
        <splash height="960" src="resources/ios/splash/Default@2x~iphone.png" width="640" />
        <splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
        <splash height="2732" src="resources/ios/splash/Default@2x~universal~anyany.png" width="2732" />
    </platform>
    <plugin name="ionic-plugin-keyboard" spec="^2.2.1" />
    <plugin name="info.protonet.imageresizer" spec="~0.1.1" />
    <plugin name="cordova-plugin-console" spec="^1.1.0" />
    <plugin name="cordova-plugin-camera" spec="^4.0.2" />
    <plugin name="cordova-plugin-uniquedeviceid" />
    <plugin name="cordova-plugin-app-version" />
    <plugin name="cordova-plugin-ionic-keyboard" spec="^1.1.6" />
    <plugin name="cordova-plugin-splashscreen" spec="^5.0.2" />
    <plugin name="cordova-plugin-whitelist" spec="^1.3.3" />
    <plugin name="cordova-plugin-ionic-webview" spec="^1.2.1" />
    <plugin name="cordova-plugin-statusbar" spec="^2.4.2" />
    <plugin name="cordova-plugin-device" spec="^2.0.2" />
    <plugin name="cordova-sqlite-storage" spec="^2.3.3" />
    <plugin name="cordova-plugin-googleplus" spec="^5.3.0">
        <variable name="REVERSED_CLIENT_ID" value="com.googleusercontent.apps.781145103219-a87b3bd7d7858i8lrr2531nm8ml2bj6c" />
        <variable name="WEB_APPLICATION_CLIENT_ID" value="781145103219-vn75hrm8tv0b54hkck4dokv5nnr0pvao.apps.googleusercontent.com" />
    </plugin>
    <plugin name="cordova-plugin-crosswalk-webview" spec="^2.4.0">
        <variable name="XWALK_VERSION" value="22+" />
        <variable name="XWALK_LITEVERSION" value="xwalk_core_library_canary:17+" />
        <variable name="XWALK_COMMANDLINE" value="--disable-pull-to-refresh-effect" />
        <variable name="XWALK_MODE" value="embedded" />
        <variable name="XWALK_MULTIPLEAPK" value="true" />
    </plugin>
    <plugin name="cordova-plugin-geolocation" spec="^2.4.3">
        <plugin name="cordova-plugin-nativestorage" spec="^2.3.2" />
        <variable name="GEOLOCATION_USAGE_DESCRIPTION" value=" " />
    </plugin>
    <plugin name="cordova-android-support-gradle-release">
        <variable name="ANDROID_SUPPORT_VERSION" value="27.+" />
    </plugin>
    <engine name="browser" spec="5.0.3" />
    <engine name="android" spec="7.0.0" />
</widget>

离子信息。

Ionic:

   ionic (Ionic CLI)  : 4.0.3
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.1.11

Cordova:

   cordova (Cordova CLI) : not installed
   Cordova Platforms     : not available

System:

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

Environment:

   ANDROID_HOME : not set

enter image description here

该应用一直显示并永久停留在index.html上

如果有人可以帮助我,我将不胜感激

[更新]

使用--livereload-port -c -d

登录
eb I/chromium: [INFO:CONSOLE(655)] "Uncaught SyntaxError: Unexpected identifier", source: http://192.168.0.85:8100/build/main.js (655)

这是第655行

async obtenerImagenes(iddistribuidora) { //<-- 655
    try {
        let entryRepoImagenes = this.connection.getRepository(ttImagenes_1.ttImagenes);
        return await entryRepoImagenes.find({ iddistribuidora: iddistribuidora });
    }
    catch (e) {
    }
}

0 个答案:

没有答案