对于我现有的5.3.2 Nativescript,当我尝试升级到NativeScript 6.0以合并一个插件时,无法在模拟器中启动该应用程序
我已经纠正了构建过程中的任何红线错误。这些错误与将所有TS文件包括在tsconfig.json文件中有关,这是我以前从未做过的。
The build result is located at: C:\Users\xxx\git\xxx\platforms\android\app\build\outputs\apk\debug\app-debug.apk
Installing on device xx.xx.xx.xx:5555...
Successfully installed on device with identifier 'xx.xx.xx.xx:5555'.
Restarting application on device xx.xx.xx.xx:5555...
Successfully synced application org.nativescript.xxx on device 192.168.24.102:5555.
ActivityManager: Start proc 7559:org.nativescript.xxx/u0a66 for activity org.nativescript.xxx/com.tns.NativeScriptActivity
JS: HMR: Hot Module Replacement Enabled. Waiting for signal.
System.err: An uncaught Exception occurred on "main" thread.
System.err: Unable to start activity ComponentInfo{org.nativescript.xxx/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: Calling js method onCreate failed
System.err: Error: Expected 'styles' to be an array of strings.
System.err: StackTrace:
System.err: java.lang.RuntimeException: Unable to start activity ComponentInfo{org.nativescript.xxx/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: Calling js method onCreate failed
System.err: Error: Expected 'styles' to be an array of strings.
System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
System.err: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
System.err: at android.app.ActivityThread.-wrap11(ActivityThread.java)
System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
System.err: at android.os.Handler.dispatchMessage(Handler.java:102)
System.err: at android.os.Looper.loop(Looper.java:148)
System.err: at android.app.ActivityThread.main(ActivityThread.java:5417)
System.err: at java.lang.reflect.Method.invoke(Native Method)
System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
System.err: Caused by: com.tns.NativeScriptException: Calling js method onCreate failed
System.err: Error: Expected 'styles' to be an array of strings.
System.err: at com.tns.Runtime.callJSMethodNative(Native Method)
System.err: at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1242)
System.err: at com.tns.Runtime.callJSMethodImpl(Runtime.java:1122)
System.err: at com.tns.Runtime.callJSMethod(Runtime.java:1109)
System.err: at com.tns.Runtime.callJSMethod(Runtime.java:1089)
System.err: at com.tns.Runtime.callJSMethod(Runtime.java:1081)
System.err: at com.tns.NativeScriptActivity.onCreate(NativeScriptActivity.java:19)
System.err: at android.app.Activity.performCreate(Activity.java:6237)
System.err: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
System.err: ... 9 more
ActivityManager: Process org.nativescript.xxx(pid 7559) has died
虽然在构建,安装和同步过程中没有错误,但我不知道如何进一步排除故障。
答案 0 :(得分:0)
尝试执行以下步骤(Android / iOS):