Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork10
Description
When building for Android, app throws a JavaScript error and is unable to build.
An uncaught Exception occurred on "main" thread.
java.lang.RuntimeException: Unable to create application com.tns.NativeScriptApplication:
com.tns.NativeScriptException:
Error calling module function
Error calling module function
Error: java.lang.ClassNotFoundException: com.tns.NativeScriptActivity
java.lang.Class.classForName(Native Method)
java.lang.Class.forName(Class.java:453)
java.lang.Class.forName(Class.java:378)
com.tns.Runtime.getClassForName(Runtime.java:1036)
com.tns.ClassResolver.resolveClass(ClassResolver.java:27)
com.tns.Runtime.resolveClass(Runtime.java:604)
com.tns.Runtime.runModule(Native Method)
com.tns.Runtime.runModule(Runtime.java:553)
com.tns.Runtime.run(Runtime.java:545)
com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1154)
android.app.ActivityThread.handleBindApplication(ActivityThread.java:5871)
android.app.ActivityThread.access$1100(ActivityThread.java:199)
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650)
android.os.Handler.dispatchMessage(Handler.java:106)
android.os.Looper.loop(Looper.java:193)
android.app.ActivityThread.main(ActivityThread.java:6669)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
When I comment out the MultiDrawer import from my main.js file, the error goes away and my app builds fine, so this is what I have narrowed it down to.
One thing to note: If I build the app with a different drawer like RadSideDrawer, then comment out the RadSideDrawer and uncomment out the MultiDrawer (without rebuilding)tns run android --bundle
, it will work fine. If I run a clean and build, it throws the error above.