Closed andy-tai closed 7 years ago
I'll try to get to this soon. Thanks
Just tried and everything worked okay.
No need to add the plugin manually to the demo (it comes down as part of the source) which might have been part of the issue, you might have two instances of the same module causing this conflict of the parser not finding it.
tns build android
tns run android
or livesyncClosing this, I'm unable to reproduce. If you still have an issue just let me know. Thanks.
Nativescript 2.3, with Angular 2.0 on Android emulator running Android 6.0
host: Fedora 23 (GNU/Linux) x86-64 with Android SDK 25.2
steps: git clone the nativescript-checkbox repo, staying in the master branch and head of the tree, and
cd demo tns plugin add nativescript-checkbox tns run android --emulator
the app gets built and installed in the emulator. Upon starting, the app fails with these logs in logcat:
10-22 09:30:53.381 9146 9146 D TNS.Native: V8 version 4.7.80 10-22 09:30:53.429 9146 9146 D TNS.Native: lenNodes=62484, lenNames=733591, lenValues=818035 10-22 09:30:53.429 9146 9146 D TNS.Native: time=1 10-22 09:30:53.487 9146 9146 D TNS.Java: Enabling NativeScript Debugger Agent 10-22 09:30:53.777 9146 9146 E art : invalid stream - problem with parameter iterator in /data/app/org.nativescript.demo-1/base.apk for method void com.tns.NativeScriptActivity.onCreate(android.os.Bundle) 10-22 09:30:53.778 9146 9146 E art : invalid stream - problem with parameter iterator in /data/app/org.nativescript.demo-1/base.apk for method void com.tns.NativeScriptActivity.onCreate(android.os.Bundle) 10-22 09:30:53.780 9146 9146 D AndroidRuntime: Shutting down VM 10-22 09:30:53.780 9146 9146 E art : invalid stream - problem with parameter iterator in /data/app/org.nativescript.demo-1/base.apk for method void com.tns.NativeScriptActivity.onCreate(android.os.Bundle) 10-22 09:30:53.780 9146 9146 W System.err: java.lang.RuntimeException: Unable to start activity ComponentInfo{org.nativescript.demo/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: 10-22 09:30:53.780 9146 9146 W System.err: Calling js method onCreate failed 10-22 09:30:53.780 9146 9146 W System.err: Error: Building UI from XML. @file:///app/main-page.xml:15:25 10-22 09:30:53.780 9146 9146 W System.err: ↳Module '/data/data/org.nativescript.demo/files/app/nativescript-checkbox' not found for element 'nativescript-checkbox:CheckBox'. 10-22 09:30:53.780 9146 9146 W System.err: ↳com.tns.NativeScriptException: Failed to find module with absolute path: "/data/data/org.nativescript.demo/files/app/nativescript-checkbox". 10-22 09:30:53.780 9146 9146 W System.err: com.tns.Module.resolvePathHelper(Module.java:220) 10-22 09:30:53.780 9146 9146 W System.err: com.tns.Module.resolvePath(Module.java:60) 10-22 09:30:53.780 9146 9146 W System.err: com.tns.Runtime.callJSMethodNative(Native Method) 10-22 09:30:53.780 9146 9146 W System.err: com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:865) 10-22 09:30:53.780 9146 9146 W System.err: com.tns.Runtime.callJSMethodImpl(Runtime.java:730) 10-22 09:30:53.780 9146 9146 W System.err: com.tns.Runtime.callJSMethod(Runtime.java:716) 10-22 09:30:53.780 9146 9146 W System.err: com.tns.Runtime.callJSMethod(Runtime.java:697) 10-22 09:30:53.780 9146 9146 W System.err: com.tns.Runtime.callJSMethod(Runtime.java:687) 10-22 09:30:53.780 9146 9146 W System.err: com.tns.NativeScriptActivity.onCreate(android.app.Activity.java) 10-22 09:30:53.780 9146 9146 W System.err: android.app.Activity.performCreate(Activity.java:6237) 10-22 09:30:53.780 9146 9146 W System.err: android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107) 10-22 09:30:53.780 9146 9146 W System.err: android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369) 10-22 09:30:53.780 9146 9146 W System.err: android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476) 10-22 09:30:53.780 9146 9146 W System.err: android.app.ActivityThread.-wrap11(ActivityThread.java) 10-22 09:30:53.780 9146 9146 W System.err: android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344) 10-22 09:30:53.780 9146 9146 W System.err: android.os.Handler.dispatchMessage(Handler.java:102) 10-22 09:30:53.780 9146 9146 W System.err: android.os.Looper.loop(Looper.java:148) 10-22 09:30:53.780 9146 9146 W System.err: android.app.ActivityThread.main(ActivityThread.java:5417) 10-22 09:30:53.780 9146 9146 W System.err: java.lang.reflect.Method.invoke(Native Method) 10-22 09:30:53.780 9146 9146 W System.err: com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) 10-22 09:30:53.780 9146 9146 W System.err: com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 10-22 09:30:53.780 9146 9146 W System.err: File: "/data/data/org.nativescript.demo/files/app/tns_modules/ui/builder/builder.js, line: 162, column: 20 10-22 09:30:53.780 9146 9146 W System.err: StackTrace: 10-22 09:30:53.780 9146 9146 W System.err: Frame: function:'', file:'/data/data/org.nativescript.demo/files/app/tns_modules/ui/builder/builder.js', line: 162, column: 21 10-22 09:30:53.780 9146 9146 W System.err: Frame: function:'', file:'/data/data/org.nativescript.demo/files/app/tns_modules/xml/xml.js', line: 148, column: 13 10-22 09:30:53.780 9146 9146 W System.err: Frame: function:'EasySAXParser.parse', file:'/data/data/org.nativescript.demo/files/app/tns_modules/js-libs/easysax/easysax.js', line: 751, column: 23 10-22 09:30:53.780 9146 9146 W System.err: Frame: function:'XmlParser.parse', file:'/data/data/org.nativescript.demo/files/app/tns_modules/xml/xml.js', line: 195, column: 22 10-22 09:30:53.780 9146 9146 W System.err: Frame: function:'XmlStringParser.parse', file:'/data/data/org.nativescript.demo/files/app/tns_modules/ui/builder/builder.js', line: 168, column: 27 10-22 09:30:53.780 9146 9146 W System.err: Frame: function:'parseInternal', file:'/data/data/org.nativescript.demo/files/app/tns_modules/ui/builder/builder.js', line: 43, column: 11 10-22 09:30:53.780 9146 9146 W System.err: Frame: function:'loadInternal', file:'/data/data/org.nativescript.demo/files/app/tns_modules/ui/builder/builder.js', line: 120, column: 27 10-22 09:30:53.780 9146 9146 W System.err: Frame: function:'load', file:'/data/data/org.nativescript.demo/files/app/tns_modules/ui/builder/builder.js', line: 104, column: 27 10-22 09:30:53.780 9146 9146 W System.err: Frame: function:'pageFromBuilder', file:'/data/data/org.nativescript.demo/files/app/tns_modules/ui/frame/frame-common.js', line: 111, column: 27 10-22 09:30:53.780 9146 9146 W System.err: Frame: function:'resolvePageFromEntry', file:'/data/data/org.nativescript.demo/files/app/tns_modules/ui/frame/frame-common.js', line: 89, column: 20 10-22 09:30:53.780 9146 9146 W System.err: Frame: function:'Frame.navigate', file:'/data/data/org.nativescript.demo/files/app/tns_modules/ui/frame/frame-common.js', line: 165, column: 20 10-22 09:30:53.780 9146 9146 W System.err: Frame: function:'ActivityCallbacksImplementation.onCreate', file:'/data/data/org.nativescript.demo/files/app/tns_modules/ui/frame/frame.js', line: 690, column: 19 10-22 09:30:53.780 9146 9146 W System.err: Frame: function:'NativeScriptActivity.onCreate', file:'/data/data/org.nativescript.demo/files/app/tns_modules/ui/frame/activity.js', line: 12, column: 25 10-22 09:30:53.780 9146 9146 W System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416) 10-22 09:30:53.780 9146 9146 W System.err: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476) 10-22 09:30:53.780 9146 9146 W System.err: at android.app.ActivityThread.-wrap11(ActivityThread.java) 10-22 09:30:53.780 9146 9146 W System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344) 10-22 09:30:53.780 9146 9146 W System.err: at android.os.Handler.dispatchMessage(Handler.java:102) 10-22 09:30:53.780 9146 9146 W System.err: at android.os.Looper.loop(Looper.java:148) 10-22 09:30:53.780 9146 9146 W System.err: at android.app.ActivityThread.main(ActivityThread.java:5417) 10-22 09:30:53.781 9146 9146 W System.err: at java.lang.reflect.Method.invoke(Native Method) 10-22 09:30:53.781 9146 9146 W System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) 10-22 09:30:53.781 9146 9146 W System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 10-22 09:30:53.781 9146 9146 W System.err: Caused by: com.tns.NativeScriptException: 10-22 09:30:53.781 9146 9146 W System.err: Calling js method onCreate failed 10-22 09:30:53.781 9146 9146 W System.err: Error: Building UI from XML. @file:///app/main-page.xml:15:25 10-22 09:30:53.781 9146 9146 W System.err: ↳Module '/data/data/org.nativescript.demo/files/app/nativescript-checkbox' not found for element 'nativescript-checkbox:CheckBox'. 10-22 09:30:53.781 9146 9146 W System.err: ↳com.tns.NativeScriptException: Failed to find module with absolute path: "/data/data/org.nativescript.demo/files/app/nativescript-checkbox". 10-22 09:30:53.781 9146 9146 W System.err: com.tns.Module.resolvePathHelper(Module.java:220) 10-22 09:30:53.781 9146 9146 W System.err: com.tns.Module.resolvePath(Module.java:60) 10-22 09:30:53.781 9146 9146 W System.err: com.tns.Runtime.callJSMethodNative(Native Method) 10-22 09:30:53.781 9146 9146 W System.err: com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:865) 10-22 09:30:53.781 9146 9146 W System.err: com.tns.Runtime.callJSMethodImpl(Runtime.java:730) 10-22 09:30:53.781 9146 9146 W System.err: com.tns.Runtime.callJSMethod(Runtime.java:716) 10-22 09:30:53.781 9146 9146 W System.err: com.tns.Runtime.callJSMethod(Runtime.java:697) 10-22 09:30:53.781 9146 9146 W System.err: com.tns.Runtime.callJSMethod(Runtime.java:687) 10-22 09:30:53.781 9146 9146 W System.err: com.tns.NativeScriptActivity.onCreate(android.app.Activity.java) 10-22 09:30:53.781 9146 9146 W System.err: android.app.Activity.performCreate(Activity.java:6237)