Android Studio 2.3.2 Launching the app under a work profile or another user account on the target device will result in a crash

前端 未结 1 1042
小蘑菇
小蘑菇 2020-12-10 07:31

I have installed Android Studio 2.3.2 version, my application was running successfully on the emulator as well as mobile device. After making some changes it\'s not working

相关标签:
1条回答
  • 2020-12-10 08:07

    Use this to configure your project Launching your app in a Work profile

    If you run your app with Instant Run and open your app using a Work profile (or other secondary profile), your app will crash because the instrumented DEX files used by Instant Run are accessible only from the primary profile's user space.

    If you want to continue using Instant Run, just avoid opening your app with the Work profile and be sure your run configuration does not use the --user user_id flag.

    If you need to use your app with the Work profile, we recommend you create a new run configuration that includes the --user user_id flag, specifying the Work profile user ID. You can find the user ID by executing adb shell pm list users from command line. When you use the --user flag, Android Studio disables Instant Run for only that deployment; Instant Run will work again when you switch to a configuration without the --user flag.

    To disable Instant Run:

    1. Open the Settings or Preferences dialog.
    2. Navigate to Build, Execution, Deployment > Instant Run.
    3. Uncheck the box next to Enable Instant Run.
    0 讨论(0)
提交回复
热议问题