Status Update
Comments
ad...@google.com <ad...@google.com> #2
ey...@gmail.com <ey...@gmail.com> #3 Restricted
ri...@google.com <ri...@google.com> #4
ey...@gmail.com <ey...@gmail.com> #5
Why was this closed? I provided the information that was requested, and this issue is causing a lot of problems.
vs...@google.com <vs...@google.com>
ac...@google.com <ac...@google.com> #6
This is what was in the logs after the last time this happened:
Was this an install from when you didn't see a change?
I am not seeing anything unusual. Do you have a the full log where the 2nd run work as expected?
je...@google.com <je...@google.com> #7
probably a duplicate of 390736538
somehow the scenario is slightly different. What do you do between the first time you run and the second time ? Are you changing any code ? stopping the app ?
can you provide the studio logs when it happens, including the fist attempt and the second one.
ey...@gmail.com <ey...@gmail.com> #8
I will try to get it to happen again, but I don't do anything in between. I usually wait a few seconds, notice that the build is done, but the app hasn't restarted, and then I run again.
er...@gmail.com <er...@gmail.com> #9
me either. I should re-run twice. at first time, Android Studio does nothing.
ac...@google.com <ac...@google.com> #10
me either. I should re-run twice. at first time, Android Studio does nothing.
Can you describe what exactly do you mean when you say Studio "does nothing"? Was a build triggered? Did you see the application getting killed?
Can you provide us with the idea.log
and logcat when that happens?
ka...@google.com <ka...@google.com> #11
I would be also helpful to know if:
- This happens when working on an existing Run Configuration or a new one created while using this current version ?
- which Android Studio version did you upgrade from ? ( sometimes issues with data changes can cause crashes that could go unnoticed)
ey...@gmail.com <ey...@gmail.com> #12
For me it's with an existing Run Configuration, and I upgraded from the latest stable patch of Ladybug.
ka...@google.com <ka...@google.com> #13
thank you,
Is this happening everytime you open your project on Android Studio 2024.2.2
or only the first time you opened it ?
I have tried to reproduce by moving from Android Studio 2024.2.1 Patch 1
to Android Studio 2024.2.2
but did not reproduce I am afraid (on MacOs).
ey...@gmail.com <ey...@gmail.com> #14
I think the latest patch was Patch 3, but in any case it's not just the first time I opened it. It's not every time, so the next time I notice it I will grab the full diagnostic data and post here.
ey...@gmail.com <ey...@gmail.com> #15
This may be anecdata, but I am working on a BLE app, and when there is a connection open with my peripheral it stops sending out advertisements.
I had my app open, and connected to the peripheral, and then I built and deployed (using Run) from Android Studio. The app restarted (which should've killed the BLE connection), and then I got distracted by some other things. When I came back to the app a few minutes later and tried connecting to my peripheral, I couldn't find its advertisements. To be safe, I restarted the app, but I still couldn't get any advertisements. Finally, I turned off bluetooth off from the device, and then turned it back on again, and then I started seeing advertisements coming in again.
While it's possible the OS held onto the dangling connection incorrectly, I think it's more likely that Android Studio didn't completely kill the existing app process, and it was alive somewhere in the background (it didn't show in Device Explorer or recent apps on the device). Maybe it can help explain what is happening with this issue.
I am attaching idea.log
in the next comment, but since some time passed before I realized there was a problem I don't have much context into what I was doing when in the log file.
ey...@gmail.com <ey...@gmail.com> #16 Restricted
ey...@gmail.com <ey...@gmail.com> #17 Restricted
ey...@gmail.com <ey...@gmail.com> #18 Restricted
je...@google.com <je...@google.com> #19
This does not seem to be a build issue. Alan, do you have an idea what might cause
ac...@google.com <ac...@google.com> #20
Again, thanks for getting back to us.
re: #15:
Studio doesn't keep an active connection in such a way that would force a process to be kept around like this.
re: #18
so I uninstalled the app, and ran again. Nothing happened, and this printed to logcat
After a few seconds the app installed and ran, however, it was still the old version of the app.
Hmm, if you ever uninstalled the application. It invalidates all the Deployment optimizations. Studio should have fall back to straight to the most basic installation output from the build system. May be there is some sort of caching issue with it.
Is that part of the log? I see there are 15 installs and all 15 appeared to be incremental (meaning we were able to detect an on device version of the application)
Did you attempt the uninstall after you pulled the log?
Here are the (redacted) logs:
2025-01-27 23:39:19,990 size='46,473,358', fingerprint='99040f5e8d3f3c946ab72f9ecc064206876b322e',
2025-01-27 23:51:52,002 size='46,473,358', fingerprint='99040f5e8d3f3c946ab72f9ecc064206876b322e',
2025-01-28 00:10:13,127 size='46,474,618', fingerprint='77f344f0fccdb99cf2c646a73455b8701f884e76',
2025-01-28 00:15:28,233 size='46,485,758', fingerprint='a681b0db7234313458309337795ba5e7c0ba1ebe',
2025-01-28 00:22:17,786 size='46,485,894', fingerprint='2d93b6535c2ef0407c1cce894e1eb62360cf940b',
2025-01-28 00:26:29,147 size='46,485,894', fingerprint='6fa25eee0970d49b3be1fc975f754472def5e810',
2025-01-28 00:27:39,924 size='46,485,894', fingerprint='b9adb79cdae14a9c494c728e87782f5ab4d79159',
2025-01-28 00:29:36,086 size='46,486,082', fingerprint='b7ed35881d647edf23aaf947a9ef8638a9fcf015',
2025-01-28 00:30:56,499 size='46,486,082', fingerprint='78ab50c2af8894115529170af0728eed3547a0a0',
2025-01-28 00:32:05,719 size='46,485,894', fingerprint='89462f6620d075e01269054e0029389e71a27b42',
2025-01-28 00:32:50,485 size='46,485,894', fingerprint='ec893736ae275138ff6c243644daf65dd2b81c99',
2025-01-28 00:33:37,871 size='46,485,894', fingerprint='b4eca31f1b9c3ff7105e67ac3e18e351c0aeeb17',
2025-01-28 00:34:01,672 size='46,485,894', fingerprint='cfc7dba229ede8ef34784137b3499e3b6e1d44fd',
2025-01-28 00:34:34,986 size='46,485,894', fingerprint='968586ebad8834ccae5c4061d295da2414555e07',
2025-01-28 00:35:28,955 size='46,485,894', fingerprint='192c04b42224ceb863b0141c8f2f64c9c4c42037',
We added some logging to the next release which should tell us a big more.
@noahz: The logging that you are about to add, are we able to tell exactly which file IWI uploaded to the device? I suspect that the size=46,485,894
installs contains not update to the APK besides may be some build configuration metadata.
Lastly, @eygraber, can you also try to keep around the APKs when that happens? You can find it in your directory's app/build/intermediates/apk/dev/debug/app-dev-debug.apk
. We should be able to inspect rather your changes are in the APK by inspecting it.
ey...@gmail.com <ey...@gmail.com> #21
Re: #18
I believe I only tried uninstalling after pulling the logs.
I will pull the APK next time this happens.
ey...@gmail.com <ey...@gmail.com> #22 Restricted
ga...@gmail.com <ga...@gmail.com> #23
I noticed a weird behavior. Please use the following steps:
- Create an empty project
- Run the app
- Move the app to the background
- Run command
adb shell am kill package_name
- Open the app using Recent apps
- Change the code
- Run the app again
After the successful build I don't see the latest code changes on Android Studio Ladybug Feature Drop | 2024.2.2 so I need to run the build again. Also, I have tried the same steps on Android Studio Ladybug | 2024.2.1 Patch 3, and it works as expected.
I hope this will help to debug the issue somehow
ey...@gmail.com <ey...@gmail.com> #24
Not sure if this is related, but I tried running the app with the debugger when the app was already running, and it didn't restart, and the following was printed in logcat:
03:17:14.027 ziparchive W Unable to open '/data/data/com.myapp/code_cache/.overlay/base.apk/classes7.dm': No such file or directory
03:17:14.029 W Unable to open '/data/data/com.myapp/code_cache/.overlay/base.apk/classes11.dm': No such file or directory
03:17:14.031 W Unable to open '/data/data/com.myapp/code_cache/.overlay/base.apk/classes26.dm': No such file or directory
03:17:14.032 W Unable to open '/data/data/com.myapp/code_cache/.overlay/base.apk/classes6.dm': No such file or directory
03:17:14.032 W Unable to open '/data/data/com.myapp/code_cache/.overlay/base.apk/classes12.dm': No such file or directory
03:17:14.034 W Unable to open '/data/data/com.myapp/code_cache/.overlay/base.apk/classes10.dm': No such file or directory
03:17:14.036 W Unable to open '/data/app/~~Fh44Ozu5aoKMt-S7QnztNg==/com.myapp-rHFTNu5HmyCoerGaAee65g==/base.dm': No such file or directory
03:17:14.036 W Unable to open '/data/app/~~Fh44Ozu5aoKMt-S7QnztNg==/com.myapp-rHFTNu5HmyCoerGaAee65g==/base.dm': No such file or directory
03:17:14.192 nativeloader D Configuring clns-7 for other apk /data/app/~~Fh44Ozu5aoKMt-S7QnztNg==/com.myapp-rHFTNu5HmyCoerGaAee65g==/base.apk. target_sdk_version=35, uses_libraries=, library_path=/data/app/~~Fh44Ozu5aoKMt-S7QnztNg==/com.myapp-rHFTNu5HmyCoerGaAee65g==/lib/arm64:/data/app/~~Fh44Ozu5aoKMt-S7QnztNg==/com.myapp-rHFTNu5HmyCoerGaAee65g==/base.apk!/lib/arm64-v8a, permitted_path=/data:/mnt/expand:/data/user/0/com.myapp
03:17:14.194 CompatChangeReporter D Compat change id reported: 202956589; UID 10464; state: ENABLED
ey...@gmail.com <ey...@gmail.com> #25
Is this a dupe of
ac...@google.com <ac...@google.com> #26
Is this a dupe of
https://issuetracker.google.com/issues/389067070
Yes. Android Studio Ladybug Feature Drop | 2024.2.2 Patch 2 should have a fix for it. Please open new bug if you are seeing issue again.
Description
After updating to AS Ladybug Feature Drop, frequently when I Run my app, it builds, and says it deployed to the device, but it didn't. I have to Run a second time for this to happen. I will try to capture logs the next time this happens.