Я создал очень простое приложение с 3 вкладками и списком, созданным с помощью http call / axios.
Когда я запускаю tns run android --bundle
все работает нормально, но когда я пытаюсь tns preview
с помощью приложения для игр на моем телефоне с Android, я получаю эту ошибку:
Cannot compile /data/data/org.nativescript.preview/files/app/main.js
SyntaxError: Unexpected identifier
File: "file:///data/data/org.nativescript.preview/files/app/main.js, line: 1, column: 67
StackTrace:
Frame: function:'require', file:'', line: 1, column: 266
SyntaxError: Unexpected identifier
File: "<unknown>, line: 1, column: 265
StackTrace:
Frame: function:'require', file:'', line: 1, column: 266
at com.tns.Runtime.runModule(Native Method)
at com.tns.Runtime.runModule(Runtime.java:553)
at com.tns.Runtime.run(Runtime.java:545)
at com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1028)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5658)
at android.app.ActivityThread.-wrap2(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1637)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:156)
at android.app.ActivityThread.main(ActivityThread.java:6523)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:941)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:831)
Executing after-watch hook from /home/badr/projects/ns/annuaire/hooks/after-watch/nativescript-dev-webpack.js
Stopping webpack watch
Executing after-watch hook from /home/badr/projects/ns/annuaire/hooks/after-watch/nativescript-dev-webpack.js
Stopping webpack watch
Executing after-watch hook from /home/badr/projects/ns/annuaire/hooks/after-watch/nativescript-dev-webpack.js
Stopping webpack watch