Status Update
Comments
vi...@google.com <vi...@google.com>
st...@gmail.com <st...@gmail.com> #2
st...@gmail.com <st...@gmail.com> #3
To which directory will it unzip to with the fix? It would be helpful to know so that workarounds for the current version already use that directory.
ch...@gmail.com <ch...@gmail.com> #4
mm...@gmail.com <mm...@gmail.com> #5
Is 3.0 already released? Where can I find release notes for cmdline-tools?
ol...@gmail.com <ol...@gmail.com> #6
I guess we don't have release notes right now, beyond looking at the fixed bugs :-/
ch...@gmail.com <ch...@gmail.com> #7
Are the plans or a ticket to move the structure from cmdline-tools/<content>
to cmdline-tools/subfolder/<content>
? As it is you still need to move the content to a subfolder manually for SDK manager to work.
gm...@gmail.com <gm...@gmail.com> #8
Same symptoms on API 23-25 when app has more than one activity, see sample app from
da...@telefonica.com <da...@telefonica.com> #9
Android Studio Arctic Fox | 2020.3.1 Patch 2
Build #AI-203.7717.56.2031.7678000, built on August 26, 2021
Runtime version: 11.0.10+0-b96-7281165 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 11.6
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 4
Registry: external.system.auto.import.disabled=true
Non-Bundled Plugins: org.jetbrains.kotlin
It happens since upgrading from AS4.2 to Arctic Fox. In my case, the installation fails in an Android device running 8.1.0. The logcat shows:
10-08 08:30:39.608 1188 2415 I ActivityManager: Force stopping <package_name> appid=1000 user=0: from pid 4111
and AS shows the following log in the "run" tab:
10/08 08:30:40: Launching 'app' on <device_name>.
Couldn't terminate the existing process for <package_name>.
ac...@google.com <ac...@google.com>
du...@google.com <du...@google.com> #10
Is the repro consistent? As in, does it always happen on second Debug? Or is the number of successful Debugs variable (since restart) before this bug manifests?
It seems as a current workaround, you can terminate your app from the phone to get around this issue. Of course, this is just a temp workaround as I look into it, and I know it's a very frustrating bug.
st...@gmail.com <st...@gmail.com> #11
Reproduced with Android Studio 2021.1.1 Beta 4 and the gradle plugin 7.1.0-beta04 :
Android Studio Bumblebee | 2021.1.1 Beta 4
Build #AI-211.7628.21.2111.7905991, built on November 11, 2021
Runtime version: 11.0.11+0-b60-7590822 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Linux 4.15.0-163-generic
GC: G1 Young Generation, G1 Old Generation
Memory: 4096M
Cores: 8
Registry: external.system.auto.import.disabled=true
Non-Bundled Plugins: Dart (211.7798), org.jetbrains.kotlin (211-1.6.0-release-798-AS7442.40), io.flutter (63.0.2)
Current Desktop: KDE
I can try any time, the installation never pass. It is not the same issue than
[Deleted User] <[Deleted User]> #12
With regards to the workaround, Device owner apps cannot be force stopped through the UI. As the OP mentioned `adb install` works and that is the current workaround use.
To add, I also see the following line in Logcat:
W/ActivityManager: Ignoring request to force stop protected package {my Device Owner package} u0
sa...@yandex.ru <sa...@yandex.ru> #13
da...@telefonica.com <da...@telefonica.com> #14
ac...@google.com <ac...@google.com> #15
ch...@gmail.com <ch...@gmail.com> #16
Do you know when the patch will be released? I just updated to Bumble Bee, but still getting this on my emulator and Lenovo tab. All I did was set my device as a device owner from the ADB, and now I'm getting this problem.
bo...@detroitlabs.com <bo...@detroitlabs.com> #17
du...@google.com <du...@google.com> #18
Ok, I looked deeper into this bug. It seems like there are multiple issues at play here, and I missed the additional issue specific to this bug.
It seems like in the case of a device owner application (the app is marked as protected), we may need to uninstall prior to reinstall. Could I trouble any of you experiencing this specific issue (device owner app) to uninstall prior to clicking on debug/run? You can try adb uninstall <package_name>
.
This "bug" seems to be a deliberate limitation in Android, and I believe once you install through the normal route in Studio (instead of QR code/NFC?), subsequent run/debug should not be an issue?
ch...@gmail.com <ch...@gmail.com> #19
Thanks for the tip, du (don't know how to tag names yet). But I've tried that, and I get [DELETE_FAILED_DEVICE_POLICY_MANAGER]. When I try to remove my app as a device owner, I'm unable to, and it's greyed out. Tried booting into safe mode and searching for disabling app in settings but still no dice.
an...@gmail.com <an...@gmail.com> #20
j....@get.systems <j....@get.systems> #21
currently also no nice solutions, but maybe this helps
sa...@google.com <sa...@google.com> #22
It looks like we don't recognize when an app features BIND_DEVICE_ADMIN
permission which protects them from being force-stop
ed. Can you try this workaround:
1/ Add android:testOnly="true"
to the application node in AndroidManifest.xml
2/ Before deploying, remove admin privilege for the app. You can find out the work userID with the following command (here Work Profile UserID = 15
).
$ adb shell pm list users
Users:
UserInfo{0:Owner:c13} running
UserInfo{15:Sample Managed Profile:1030} running
Then run:
$ adb shell dpm remove-active-admin --user 15 APPID/.RECEIVER
where you replace APPID with the applicationID and RECEIVER with the class which extends DeviceAdminReceiver
You may also have to delete the Managed Profile with:
adb shell pm remove-user 15
ch...@gmail.com <ch...@gmail.com> #23
I don't get that Sample Managed Profile line like you do when listing users, just the first one. What does this mean?
ch...@gmail.com <ch...@gmail.com> #24
Killing the android app in emulator (swiping up in app switch) temporarily fixes the issue for me. Does anyone know how I can add this step to a gradle script so that's it automated? I've not been able to find such a step on Google.
ch...@gmail.com <ch...@gmail.com> #25
I've tried the suggestion in #22 and still have the issue. In fact there is only 1 user listed since my app is installed via device owner adb shell dpm set-device-owner com.truexzing.app/com.truexzing.app.AdminReceiver
hi...@gmail.com <hi...@gmail.com> #26
ch...@gmail.com <ch...@gmail.com> #27
Any update when this will be fixed? Having to uninstall my app every time I want to debug or make changes is really slowing down my development workflow.
le...@vostra.co.id <le...@vostra.co.id> #28
Android Studio Chipmunk | 2021.2.1 Beta 4
Build #AI-212.5712.43.2112.8233820, built on March 1, 2022
Runtime version: 11.0.12+0-b1504.28-7817840 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 12.1
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 8
Registry: external.system.auto.import.disabled=true
st...@gmail.com <st...@gmail.com> #29
le...@vostra.co.id <le...@vostra.co.id> #30
When I got message "Couldn't terminate the existing process for xxxxx",
1. Press "Attach Debugger to Android Process" button
2. "Choose Process" dialog will be shown and the application name is listed, press "OK"
3. Check the "Debug" tab console, when it says "Connected to the target VM, address: 'localhost:60245', transport: 'socket'"
4. Press the "Debug" Button.
5. Device will relaunch the app with latest changes
Please kindly test if this also works for you guys.
Cheers
jo...@gmail.com <jo...@gmail.com> #31
ch...@gmail.com <ch...@gmail.com> #32
Any update on resolving this? At this point Android debugging/development is impossible with this bug.
23...@gmail.com <23...@gmail.com> #33
I have the same problem.This problem happen if my app keep alive, Please let me know if you need any more help
Android Studio Chipmunk | 2021.2.1 Patch 1
Build #AI-212.5712.43.2112.8609683, built on May 19, 2022
Runtime version: 11.0.12+7-b1504.28-7817840 amd64
VM: OpenJDK 64-Bit Server VM by Oracle Corporation
Windows 10 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 4096M
Cores: 8
Registry: external.system.auto.import.disabled=true
Non-Bundled Plugins: com.kun.FormatJSONForEntity (2.0), cn.jxzhang.plugin.json-formatter (1.4), GsonFormatPlus (1.6.1), com.nvinayshetty.DTOnator (V0.997)
du...@google.com <du...@google.com>
sa...@google.com <sa...@google.com>
q6...@gmail.com <q6...@gmail.com> #34
sh...@gmail.com <sh...@gmail.com> #35
sa...@gmail.com <sa...@gmail.com> #36
So the above workaround didn't work for me.
I'm working on Ubuntu 20.04 - with multiple versions of ADB and multiple versions of AOSP.
So for some reason Android Studio was picking up the wrong ADB server .. I invalidated and restarted without any luck. It looked like AS was not able to communicate to the device at all, but I was able to run my commands from the terminal without probs.
I also tried to run adb kill-server but that didn't seem to work a few times. But finally I got it working by killing the server from the terminal and directly launching the test immediately after.
ps...@gmail.com <ps...@gmail.com> #37
11/04 14:30:18: Launching 'XXX..' on emulator-5554.
Couldn't terminate the existing process for com.xx.xx.
I tried the Gradle command to run the test but it does not work
ch...@gmail.com <ch...@gmail.com> #38
Android Studio Electric Eel | 2022.1.1 Patch 1
Build #AI-221.6008.13.2211.9514443, built on January 20, 2023
Runtime version: 11.0.15+0-b2043.56-8887301 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 13.0
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 16
Registry:
external.system.auto.import.disabled=true
debugger.watches.in.variables=false
ide.text.editor.with.preview.show.floating.toolbar=false
fg...@gmail.com <fg...@gmail.com> #39
adb shell dpm remove-active-admin <package_name>/.RECEIVER
Hope it works.
ac...@google.com <ac...@google.com>
ac...@google.com <ac...@google.com> #40
ju...@gmail.com <ju...@gmail.com> #41
sa...@gmail.com <sa...@gmail.com> #42
Still have this issue
ga...@gmail.com <ga...@gmail.com> #43
Still exists in :
Android Studio Koala | 2024.1.1 Patch 1 Build #AI-241.18034.62.2411.12071903, built on July 11, 2024 Runtime version: 17.0.11+0--11852314 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Windows 11.0 GC: G1 Young Generation, G1 Old Generation Memory: 1024M Cores: 24 Registry: ide.instant.shutdown=false debugger.new.tool.window.layout=true ide.experimental.ui=true ide.experimental.ui.inter.font=true terminal.new.ui=true Non-Bundled Plugins: Statistic (4.2.14) com.intellij.marketplace (241.17890.43) String Manipulation (9.14.1) wu.seal.tool.jsontokotlin (3.7.4) idea.plugin.protoeditor (241.15989.49) by.overpass.svg-to-compose-intellij (0.16) zielu.gittoolbox (500.2.12+233) mobi.hsz.idea.gitignore (4.5.3)
ac...@google.com <ac...@google.com> #44
Still exists in..
Can you open a new bug and provide a small repro?
Description
all required information.
Studio Build:
Android Studio Arctic Fox | 2020.3.1 Canary 7
Build #AI-203.7148.57.2031.7136282, built on February 10, 2021
Runtime version: 11.0.8+0-b944-P17168821 amd64
VM: OpenJDK 64-Bit Server VM by N/A
Linux 4.15.0-135-generic
GC: G1 Young Generation, G1 Old Generation
Memory: 4096M
Cores: 8
Registry: external.system.auto.import.disabled=true
Current Desktop: KDE
Version of Gradle Plugin: 4.1.2
Version of Gradle: 6.8
Version of Java: 11.0.8+0-b944-P17168821
OS: Linux Ubuntu Bionic
Steps to Reproduce:
1. Open a project with Android Studio
2. Plug a device with the application installed as Device Owner application (by a QR code or NFC tag)
2. Click on "play" (or "debug")
3. See the progression :
=> "Gradle Build Running"
=> "Waiting for all target devices to come online"
then the task disparear
on "Run" window, we have the message "Couldn't terminate the existing process for <app_pkg_name>"
4. Check the device: application has not been updated neither restarted.
The issue is produced on many Samsung devices (just tested on a Galaxy S21 (Android 11) freshly wiped, but same behavior on a Note10, Galaxy S8, etc.).
Installing from the commandline by adb install command works well
Installing a standard application (not installed in Device Owner mode) works well.
Upgrading to the gradle plugin 7.0.0-alpha7 (gradle 6.8.1) does not work too (same issue).
Trying to enable "Always install with package manager (disables deploy optimizations on Android 11 and later)" on Run / Debug configuration window does not solve the issue.
Installing the application from Android Studio 4.1.2 works well.