skip to Main Content

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

2

Answers


  1. 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
    
    Login or Signup to reply.
  2. Check Gradle Settings:

    Make sure your Gradle settings are correctly configured in your Android Studio project. Gradle settings sometimes need to be updated when you upgrade Android Studio.

    Check AndroidManifest.xml:

    Ensure that your app’s package name in the AndroidManifest.xml file is correctly set. If it’s changed due to any reason, it might cause issues.

    Clean and Rebuild:

    Try cleaning your project by going to Build > Clean Project and then rebuilding it using Build > Rebuild Project.

    Check for Configuration Issues:

    Review your run/debug configurations in Android Studio to ensure they are correctly set up.

    Run Configuration:

    When running your app from Android Studio, make sure you are using the correct run configuration (e.g., selecting the correct module and device).

    ADB Connection:

    Ensure that your device is correctly connected to Android Studio via ADB (Android Debug Bridge). Sometimes, connection issues can cause apps to be uninstalled.

    Device Settings:

    Check your device’s settings to see if there are any settings related to automatic app uninstallation. Some devices have options that can remove apps automatically to free up space.

    Logcat:

    Open the Logcat panel in Android Studio to see if there are any error messages or warnings when you run your app. This might give you more insight into what’s going wrong.

    Emulator/Device Profiles:

    If you’re using an emulator, check if the emulator profile is set to wipe data on startup. Adjust these settings if needed.

    Rollback to Previous Version:

    As you mentioned, reverting Android Studio to a previous version (Flamingo) and the Gradle Plugin to 8.0.2 resolved the issue. This is a valid workaround if the issue persists and is affecting your productivity.


    You’ve already reported the issue on the Google Issue Tracker
    Giraffe uninstalls my app without my permission. Continue to monitor the issue there for updates from Google’s development team.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search