Error while Installing restart patches when launching android app with Android Studio 2.0

后端 未结 10 836
既然无缘
既然无缘 2020-12-30 19:57

Currently I\'m using Android Studio 2.0 and installing my APK into my Samsung device (S6). However, when rebuilding my code and running it again I receive the following erro

相关标签:
10条回答
  • 2020-12-30 20:15

    This started happening on my Samsung Tab A as soon as I installed the Marshmallow upgrade. This was painful because Android Studio had to perform a slow recompile of the entire app for every minor code change. Worse, Instrumentation no longer worked, e.g. an NPE would crash the app without showing any messages in the debug window.

    The problems went away when when I reverted back to Lollipop.

    Despite what Samsung support told me, I am able to block the annoying Marshmallow upgrade popups by disabling Software update (com.wssyncmldm and com.sec.android.fotaclient).

    According to Google "this is a bug on the android software installed on these phones" https://code.google.com/p/android/issues/detail?id=200881. The next device I purchase for app development will not be a Samsung.

    0 讨论(0)
  • 2020-12-30 20:16

    I think the issue is due to instant run feature of Android Studio 2.0. This might help

    1. Open the Settings or Preferences dialog.
    2. Navigate to Build, Execution, Deployment > Instant Run.
    3. Uncheck the box next to Restart activity on code changes
    0 讨论(0)
  • 2020-12-30 20:16

    Another solution can be by selecting the Run button, the app on the device crashes, since it tries to reopen with an instance of itself already running, and then by selecting another time the Run button.

    In this way the patches that need to be applied to the app will be compiled and the app restart with its new version.

    0 讨论(0)
  • 2020-12-30 20:18

    Restarting Android Studio worked for me.

    I think the error happens when you disconnect the device when it is running your app from Android Studio.

    0 讨论(0)
  • 2020-12-30 20:23

    Me to having the same issue and u can resolve it by uninstalling the app before running the app from android studio

    0 讨论(0)
  • 2020-12-30 20:26

    I am having the same issue. My "fix" was to uninstall the app each time before installing it through Android Studio.
    What I think is that if your app is running already, Android Studio is unable to rewrite the "updated" build on top of that. So, either you manually stop the app or add this to Gradle to fix the issue.
    I know it's just a workaround and I'd love to get a legitimate fix for this.

    0 讨论(0)
提交回复
热议问题