Nativescript-onesignal找不到模块:相对于app / tns_modules /的nativescript-onesignal

时间:2018-12-06 15:42:36

标签: nativescript

我真的不知道在哪里搜索,我看到很多相关的问题,但是我似乎解决了一个问题,然后又出现了另一个问题。问题是,我正在使用onesignal(带有nativescript sdk)发送推送通知,并且在ios上一切正常,但是当我尝试在android上本地运行时,会出现很多问题:

第一个问题是我遇到了一名行家 {url“ https://plugins.gradle.org/m2/”} ,所以我按照here的指示进行了操作摆脱这个问题。另外,我认为重要的是,我使用的是sidekick,从这里我安装了一个指向here的onesignal插件,但在这些说明中(我给出的上一个链接)指向另一个插件...好吧...没问题,我遵循了其余说明,现在我的第二个问题是该应用正在运行中,但它中断并显示您看到的错误下面的日志:

System.err: Error: com.tns.NativeScriptException: Failed to find module: "nativescript-onesignal", relative to: app/tns_modules/
System.err:     com.tns.Module.resolvePathHelper(Module.java:146)
System.err:     com.tns.Module.resolvePath(Module.java:55)
System.err:     com.tns.Runtime.runModule(Native Method)
System.err:     com.tns.Runtime.runModule(Runtime.java:553)
System.err:     com.tns.Runtime.run(Runtime.java:545)
System.err:     com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
System.err:     android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1017)
System.err:     android.app.ActivityThread.handleBindApplication(ActivityThread.java:4864)
System.err:     android.app.ActivityThread.access$1500(ActivityThread.java:178)
System.err:     android.app.ActivityThread$H.handleMessage(ActivityThread.java:1531)
System.err:     android.os.Handler.dispatchMessage(Handler.java:111)
System.err:     android.os.Looper.loop(Looper.java:194)
System.err:     android.app.ActivityThread.main(ActivityThread.java:5643)
System.err:     java.lang.reflect.Method.invoke(Native Method)
System.err:     java.lang.reflect.Method.invoke(Method.java:372)
System.err:     com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:960)
System.err:     com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
System.err: File: "<unknown>, line: 1, column: 265
System.err: StackTrace:
System.err:     Frame: function:'require', file:'', line: 1, column: 266
System.err:     Frame: function:'', file:'file:///data/data/pt.wemakeapps.brleads/files/app/app.js', line: 8, column: 22
System.err:     Frame: function:'require', file:'', line: 1, column: 266
System.err: Error: com.tns.NativeScriptException: Failed to find module: "nativescript-onesignal", relative to: app/tns_modules/
System.err:     com.tns.Module.resolvePathHelper(Module.java:146)
System.err:     com.tns.Module.resolvePath(Module.java:55)
System.err:     com.tns.Runtime.runModule(Native Method)
System.err:     com.tns.Runtime.runModule(Runtime.java:553)
System.err:     com.tns.Runtime.run(Runtime.java:545)
System.err:     com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
System.err:     android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1017)
System.err:     android.app.ActivityThread.handleBindApplication(ActivityThread.java:4864)
System.err:     android.app.ActivityThread.access$1500(ActivityThread.java:178)
System.err:     android.app.ActivityThread$H.handleMessage(ActivityThread.java:1531)
System.err:     android.os.Handler.dispatchMessage(Handler.java:111)
System.err:     android.os.Looper.loop(Looper.java:194)
System.err:     android.app.ActivityThread.main(ActivityThread.java:5643)
System.err:     java.lang.reflect.Method.invoke(Native Method)
System.err:     java.lang.reflect.Method.invoke(Method.java:372)
System.err:     com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:960)
System.err:     com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
System.err: File: "<unknown>, line: 1, column: 265
System.err: StackTrace:
System.err:     Frame: function:'require', file:'', line: 1, column: 266
System.err:     Frame: function:'', file:'file:///data/data/pt.wemakeapps.brleads/files/app/app.js', line: 8, column: 22
System.err:     Frame: function:'require', file:'', line: 1, column: 266
System.err:     at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4867)
System.err:     at android.app.ActivityThread.access$1500(ActivityThread.java:178)
System.err:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1531)
System.err:     at android.os.Handler.dispatchMessage(Handler.java:111)
System.err:     at android.os.Looper.loop(Looper.java:194)
System.err:     at android.app.ActivityThread.main(ActivityThread.java:5643)
System.err:     at java.lang.reflect.Method.invoke(Native Method)
System.err:     at java.lang.reflect.Method.invoke(Method.java:372)
System.err:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:960)
System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
System.err: Caused by: com.tns.NativeScriptException:
System.err: Error calling module function
System.err: Error: com.tns.NativeScriptException: Failed to find module: "nativescript-onesignal", relative to: app/tns_modules/
System.err:     com.tns.Module.resolvePathHelper(Module.java:146)
System.err:     com.tns.Module.resolvePath(Module.java:55)
System.err:     com.tns.Runtime.runModule(Native Method)
System.err:     com.tns.Runtime.runModule(Runtime.java:553)
System.err:     com.tns.Runtime.run(Runtime.java:545)
System.err:     com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
System.err:     android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1017)
System.err:     android.app.ActivityThread.handleBindApplication(ActivityThread.java:4864)
System.err:     android.app.ActivityThread.access$1500(ActivityThread.java:178)
System.err:     android.app.ActivityThread$H.handleMessage(ActivityThread.java:1531)
System.err:     android.os.Handler.dispatchMessage(Handler.java:111)
System.err:     android.os.Looper.loop(Looper.java:194)
System.err:     android.app.ActivityThread.main(ActivityThread.java:5643)
System.err:     java.lang.reflect.Method.invoke(Native Method)
System.err:     java.lang.reflect.Method.invoke(Method.java:372)
System.err:     com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:960)
System.err:     com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
System.err: File: "<unknown>, line: 1, column: 265
System.err: StackTrace:
System.err:     Frame: function:'require', file:'', line: 1, column: 266
System.err:     Frame: function:'', file:'file:///data/data/pt.wemakeapps.brleads/files/app/app.js', line: 8, column: 22
System.err:     Frame: function:'require', file:'', line: 1, column: 266
System.err: Error: com.tns.NativeScriptException: Failed to find module: "nativescript-onesignal", relative to: app/tns_modules/
System.err:     com.tns.Module.resolvePathHelper(Module.java:146)
System.err:     com.tns.Module.resolvePath(Module.java:55)
System.err:     com.tns.Runtime.runModule(Native Method)
System.err:     com.tns.Runtime.runModule(Runtime.java:553)
System.err:     com.tns.Runtime.run(Runtime.java:545)
System.err:     com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
System.err:     android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1017)
System.err:     android.app.ActivityThread.handleBindApplication(ActivityThread.java:4864)
System.err:     android.app.ActivityThread.access$1500(ActivityThread.java:178)
System.err:     android.app.ActivityThread$H.handleMessage(ActivityThread.java:1531)
System.err:     android.os.Handler.dispatchMessage(Handler.java:111)
System.err:     android.os.Looper.loop(Looper.java:194)
System.err:     android.app.ActivityThread.main(ActivityThread.java:5643)
System.err:     java.lang.reflect.Method.invoke(Native Method)
System.err:     java.lang.reflect.Method.invoke(Method.java:372)
System.err:     com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:960)
System.err:     com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
System.err: File: "<unknown>, line: 1, column: 265
System.err: StackTrace:
System.err:     Frame: function:'require', file:'', line: 1, column: 266
System.err:     Frame: function:'', file:'file:///data/data/pt.wemakeapps.brleads/files/app/app.js', line: 8, column: 22
System.err:     Frame: function:'require', file:'', line: 1, column: 266
System.err:     at com.tns.Runtime.runModule(Native Method)
System.err:     at com.tns.Runtime.runModule(Runtime.java:553)
System.err:     at com.tns.Runtime.run(Runtime.java:545)
System.err:     at com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
System.err:     at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1017)
System.err:     at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4864)

那是什么问题?有什么想法吗?

感谢您的时间 问候

0 个答案:

没有答案