Android issue when compiling for 'deploy'

Eduard Kaufmann 311 Reputation points
2023-09-23T08:24:18.71+00:00

When compiling for deploy I get error (full log attached):

"C:\Program Files (x86)\Android\android-sdk\platform-tools\adb" -s emulator-5554 uninstall -k "com.companyname.randoPro"

The -k option uninstalls the application while retaining the data/cache.

At the moment, there is no way to remove the remaining data.

You will have to reinstall the application with the same signature, and fully uninstall it.

If you truly wish to continue, execute 'adb shell cmd package uninstall -k'.

The command ""C:\Program Files (x86)\Android\android-sdk\platform-tools\adb" -s emulator-5554 uninstall -k "com.companyname.randoPro"" exited with code 1.

...

Error: INSTALL_FAILED_INSUFFICIENT_STORAGE...

...RandoPro_failed.txt

Before I make things worse I'd like to ask the community for some advise.

Some other things to know:

environment: VS 17.7.4, W11 OS build 22621.2359, 16GB mem, > 100GB free

-compiling/deploying for 'Windows Machine' all ok.

-When compiling/deploying the very same App in a much smaller Test-Version, all ok (approx. 30MB)

When compiling/deploying the full App I get above error. Before I upgraded to VS 17.7.4 the compile/deploy was ok (approx. 63MB!)

Going back to an older VS is (hopefully) not an option - lot of other code works fine.

I'm definitely not a Android 'specialist' - thanks you for your time and help, ed

Developer technologies | .NET | .NET MAUI
Microsoft Security | Intune | Microsoft Intune Android
Developer technologies | Visual Studio | Other
0 comments No comments
{count} votes

Accepted answer
  1. Krew Noah 500 Reputation points
    2023-09-23T09:41:19.7966667+00:00

    It seems like you are encountering an INSTALL_FAILED_INSUFFICIENT_STORAGE error while deploying your app to an Android emulator. This error usually indicates that there is not enough storage space on the emulator to install the application.

    Here are a few short suggestions to resolve this issue:

    1. Clear Storage on Emulator: Check the available storage on your emulator and clear unnecessary data or apps to free up space.
    2. Increase Emulator Storage: You can reconfigure your emulator to increase its available storage space.
    3. Use a Physical Device: Try deploying the app to a physical Android device with sufficient storage space.
    4. Check APK Size: Ensure that the APK size is within permissible limits and consider reducing it if possible.
    5. Reinstall Emulator: If all else fails, you might want to try reinstalling the emulator.

    Remember to check the available storage on the emulator before and after making these changes to ensure that insufficient storage is indeed the cause of the issue.

    I have checked the attached log file for additional details.

    The log snippet provided doesn't contain much information beyond what you've already mentioned. The key issue appears to be the INSTALL_FAILED_INSUFFICIENT_STORAGE error, suggesting that there isn't enough storage space on the emulator. As mentioned earlier, consider clearing up space on the emulator, increasing its storage, or deploying to a different device with sufficient storage.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.