Nativescript:部署应用程序后出现奇怪的错误

时间:2016-11-25 13:30:08

标签: android typescript nativescript

我创建了一个非常基本的Nativescript Android应用程序,它使用nativescript-barcodescanner插件。该应用程序构建成功,但当它在模拟器上部署时,我收到以下错误。知道我可以做些什么来解决这个问题或者是什么导致了这个问题?

错误:

java.lang.RuntimeException: Unable to resume activity {org.nativescript.barcodescanner/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: 
Calling js method onCreateView failed

Error: File /data/data/org.nativescript.barcodescanner/files/app/.components/information/information.component.html does not exist. Resolved from: .components/information/information.component.html.
File: "/data/data/org.nativescript.barcodescanner/files/app/tns_modules/nativescript-angular/resource-loader.js, line: 22, column: 12

StackTrace: 
    Frame: function:'FileSystemResourceLoader.get', file:'/data/data/org.nativescript.barcodescanner/files/app/tns_modules/nativescript-angular/resource-loader.js', line: 22, column: 19
    Frame: function:'DirectiveNormalizer._fetch', file:'/data/data/org.nativescript.barcodescanner/files/app/tns_modules/@angular/compiler/bundles/compiler.umd.js', line: 13661, column: 45
    Frame: function:'DirectiveNormalizer.normalizeTemplateAsync', file:'/data/data/org.nativescript.barcodescanner/files/

我的命令提示符的最后几行:

BUILD SUCCESSFUL

Total time: 1 mins 9.45 secs
Project successfully built
Successfully deployed on device with identifier '192.168.8.101:5555'.
W/System.err( 2258):    at com.tns.Runtime.callJSMethodNative(Native Method)
W/System.err( 2258):    at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:865)
W/System.err( 2258):    at com.tns.Runtime.callJSMethodImpl(Runtime.java:730)
W/System.err( 2258):    at com.tns.Runtime.callJSMethod(Runtime.java:716)
W/System.err( 2258):    at com.tns.Runtime.callJSMethod(Runtime.java:697)
W/System.err( 2258):    at com.tns.Runtime.callJSMethod(Runtime.java:687)

1 个答案:

答案 0 :(得分:0)

似乎无法找到.components/information/information.component.html并阻止恢复 活动,也许你的相对路径或某事有问题(比如组件而不是.components)