Android Studio Giraffe installed itself without my permission and screwed everything up. One of its bugs is that it keeps erasing the app I'm developing from its tablet.
How do I get the app to stay in the tablet? Android Studio uninstalls it when the wind blows. (For you juniors, that means when I run tests or try to manually operate the app)
I also wrote the issue up here because I can't tell if it's a bug or a feature:
https://issuetracker.google.com/issues/296333695
creating and testing a new blank app also has the bug. After running a test case the app disappears and must be reinstalled.
Reverting Android-Studio to Flamingo and reverting the Gradle Plugin to 8.0.2 fixed the problem. I could not figure out which one has the bug because I can't downgrade the two versions independently
When running tests on Android, the tests generally interact with the app in a real device or emulator, after the test execution is complete, the application's state is generally restored to its original state, uninstalling APKs that were installed during the test (not always the case).
But If you want to keep the APK installed on your tablet you have to install it by hand or via adb command.
I recommend using this answer: https://stackoverflow.com/a/21785770/6817463
adb install myapp.apk
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With