When I try to install my apk onto my Android Virtual Device in Android Studio with adb install my_application-aligned.apk
, I get the following error: Performing Streamed Install adb: failed to install my_application-aligned.apk: Failure [INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION: Failed to parse /data/app/vmdl530526663.tmp/base.apk: AndroidManifest.xml]
Could this be because the apk is corrupted? I can provide my Android Manifest file if that would help. I generated the APK by following this tutorial: https://medium.com/@_sathishshan/decompile-and-recompile-android-apk-7d375e1bca83 . Following this tutorial, I first downloaded an XAPK file from the internet. Then, I decompiled the APK and added some additional files to the application. Next, I recompiled the APK, and generated a new APK file. This new APK file is my_application-aligned.apk
. Thanks!
Question posted in Android Studio
The official documentation can be found here.
The official documentation can be found here.
3
Answers
So this doesn't really answer how to get rid of the error, but I think this error is showing up because the original file that I downloaded from the internet was an XAPK file, not an APK file. I just tried to do this whole process again with an APK file downloaded from the internet (not an XAPK file), and the error did not appear. So it might have something to do with the original file that I decompiled being an XAPK.
Uninstall old app from device and re run this app to device again.
It worked for me by clearing the builds folder
or