Skip to content

exception when delete a file from plugin/platforms/android #3767

Closed
@miroslavaivanova

Description

@miroslavaivanova

Tell us about the problem

Use tns run android --syncAllFiles command and delete aar file. You will see exception

Which platform(s) does your issue occur on?

Android

Please provide the following version numbers that your issue occurs with:

  • CLI: next(4.2.0-2018-07-20-12019)
  • Runtime(s): next
  • Plugin(s): nativescript-camera@4.0.2

Please tell us how to recreate the issue in as much detail as possible.

Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.

  1. tns create app
  2. tns plugin add nativescript-camera
  3. tns run android --syncAllFiles
  4. copy an aar file and paste it in /node_modules/nativescript-camera/platforms/android
  5. app will restart and then remove the same aar file
    exception will throw:
    System.err: java.lang.reflect.InvocationTargetException System.err: at java.lang.reflect.Method.invoke(Native Method) System.err: at com.tns.RuntimeHelper.initRuntime(RuntimeHelper.java:205) System.err: at com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:19) System.err: at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1119) System.err: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5740) System.err: at android.app.ActivityThread.-wrap1(Unknown Source:0) System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1656) System.err: at android.os.Handler.dispatchMessage(Handler.java:106) System.err: at android.os.Looper.loop(Looper.java:164) System.err: at android.app.ActivityThread.main(ActivityThread.java:6494) System.err: at java.lang.reflect.Method.invoke(Native Method) System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807) System.err: Caused by: java.lang.NullPointerException: Attempt to get length of null array System.err: at com.tns.NativeScriptSyncService.deleteRemovedFiles(NativeScriptSyncService.java:283) System.err: at com.tns.NativeScriptSyncService.deleteRemovedFiles(NativeScriptSyncService.java:280) System.err: at com.tns.NativeScriptSyncService.deleteRemovedFiles(NativeScriptSyncService.java:280) System.err: at com.tns.NativeScriptSyncService.executeRemovedSync(NativeScriptSyncService.java:293) System.err: at com.tns.NativeScriptSyncService.sync(NativeScriptSyncService.java:72) System.err: ... 13 more

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugos: androidrunDescribes issues related to run command

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions