I extended my application following the nativeScript documentation.
when I run
tns build android it works.
but when I build with webpack, the app crashes with this error:
An uncaught Exception occurred on "main" thread. java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{org.nativescript.StudentAssistant/com.tns.NativeScriptActivity}: com.tns.NativeScriptException:
Error calling module function
TypeError: require.context is not a function File: "file:///data/data/org.nativescript.StudentAssistant/files/app/vendor.js, line: 4, column: 28
StackTrace: Frame: function:'', file:'file:///data/data/org.nativescript.StudentAssistant/files/app/vendor.js', line: 4, column: 29 Frame: function:'require', file:'', line: 1, column: 266
TypeError: require.context is not a function File: ", line: 1, column: 265
StackTrace: Frame: function:'', file:'file:///data/data/org.nativescript.StudentAssistant/files/app/vendor.js', line: 4, column: 29 Frame: function:'require', file:'', line: 1, column: 266
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2626)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2789)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1527)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:203)
at android.app.ActivityThread.main(ActivityThread.java:6251)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1073)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:934)
Caused by: com.tns.NativeScriptException:
Error calling module function
TypeError: require.context is not a function File: "file:///data/data/org.nativescript.StudentAssistant/files/app/vendor.js, line: 4, column: 28
StackTrace: Frame: function:'', file:'file:///data/data/org.nativescript.StudentAssistant/files/app/vendor.js', line: 4, column: 29 Frame: function:'require', file:'', line: 1, column: 266
TypeError: require.context is not a function File: ", line: 1, column: 265
StackTrace: Frame: function:'', file:'file:///data/data/org.nativescript.StudentAssistant/files/app/vendor.js', line: 4, column: 29 Frame: function:'require', file:'', line: 1, column: 266
at com.tns.Runtime.runModule(Native Method)
at com.tns.Runtime.runModule(Runtime.java:530)
at com.tns.Runtime.createJSInstance(Runtime.java:624)
at com.tns.Runtime.initInstance(Runtime.java:606)
at com.tns.NativeScriptActivity.<init>(NativeScriptActivity.java:7)
at java.lang.Class.newInstance(Native Method)
at android.app.Instrumentation.newActivity(Instrumentation.java:1078)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2616)
... 9 more
what must I do?