This question is locked. New answers and comments are not allowed.
Hi
After a lot of efforts I finally managed to get my project to build with webpack in both android and IOS - npm run build-ios-bundle and npm run build-android-bundle both work and I am able to build the project successfully.
However when i try to run the project in Android i get the following error:
<p>System.err: java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{org.nativescript.qbank/com.tns.NativeScriptActivity}: com.tns.NativeScriptException:
System.err: Error: com.tns.NativeScriptException: Failed to find module:
"./tns_modules/tns-core-modules/ui/frame/activity.js"
, relative to: app
//
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:530)
System.err: com.tns.Runtime.createJSInstance(Runtime.java:624)
System.err: com.tns.Runtime.initInstance(Runtime.java:606)
System.err: com.tns.NativeScriptActivity.<init>(NativeScriptActivity.java:7)
System.err: java.lang.Class.newInstance(Native Method)
System.err: android.app.Instrumentation.newActivity(Instrumentation.java:1068)
System.err: android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2324)
System.err: android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2483)
System.err: android.app.ActivityThread.access$900(ActivityThread.java:153)
System.err: android.app.ActivityThread$H.handleMessage(ActivityThread.java:1349)
System.err: android.os.Handler.dispatchMessage(Handler.java:102)
System.err: android.os.Looper.loop(Looper.java:148)
System.err: android.app.ActivityThread.main(ActivityThread.java:5438)
System.err: java.lang.reflect.Method.invoke(Native Method)
System.err: com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
System.err: com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629)
System.err: File: "<unknown>, line: 1, column: 265
System.err: StackTrace:
System.err: Frame:
function
:
'require'
, file:
''
, line: 1, column: 266
System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2334)
System.err: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2483)
System.err: at android.app.ActivityThread.access$900(ActivityThread.java:153)
System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1349)
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:5438)
System.err: at java.lang.reflect.Method.invoke(Native Method)
System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629)
System.err: Caused by: com.tns.NativeScriptException:
System.err: Error: com.tns.NativeScriptException: Failed to find module:
"./tns_modules/tns-core-modules/ui/frame/activity.js"
, relative to: app
//
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:530)
System.err: com.tns.Runtime.createJSInstance(Runtime.java:624)
System.err: com.tns.Runtime.initInstance(Runtime.java:606)
System.err: com.tns.NativeScriptActivity.<init>(NativeScriptActivity.java:7)
System.err: java.lang.Class.newInstance(Native Method)
System.err: android.app.Instrumentation.newActivity(Instrumentation.java:1068)
System.err: android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2324)
System.err: android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2483)
System.err: android.app.ActivityThread.access$900(ActivityThread.java:153)
System.err: android.app.ActivityThread$H.handleMessage(ActivityThread.java:1349)
System.err: android.os.Handler.dispatchMessage(Handler.java:102)
System.err: android.os.Looper.loop(Looper.java:148)
System.err: android.app.ActivityThread.main(ActivityThread.java:5438)
System.err: java.lang.reflect.Method.invoke(Native Method)
System.err: com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
System.err: com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629)
System.err: File: "<unknown>, line: 1, column: 265
System.err: StackTrace:
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:530)
System.err: at com.tns.Runtime.createJSInstance(Runtime.java:624)
System.err: at com.tns.Runtime.initInstance(Runtime.java:606)
System.err: at com.tns.NativeScriptActivity.<init>(NativeScriptActivity.java:7)
System.err: at java.lang.Class.newInstance(Native Method)
System.err: at android.app.Instrumentation.newActivity(Instrumentation.java:1068)
System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2324)
System.err: ... 9 more </p><p></p>
Please let me know what I can do or if you need more information.
On IOS the project runs but the styles are not applied and I get a different error logged here
Project uses the latest tns version 3.2.0.
Thanks
Anurag