Unity Fails to Build to Android Device - INSTALL_PARSE_FAILED_NOT_APK: Failed to parse. How to solve this?
Running Unity 2018.3.10f1
AR Application, Running Vuforia 8.0.10
Running Google Firebase Auth / Storage for download of Asset Bundles per User
Until very recently, this app has functioned fine. I have dozens of previous successful APK/OBB duos. Now, since a handful of updates and bug fixes (Firebase to 5.6.0, etc), my export functionality has stalled. Upon an attempt to actually side-load a new APK/OBB onto a device for further testing, I get a Parse Error:
CommandInvokationFailure: Unable to install APK to device. Please make sure the Android SDK is installed and is properly configured in the Editor. See the Console for more details.
Further:
C:\Users[USER]\AppData\Local\Android\sdk\platform-tools\adb.exe -s "HT7530206306" install -r "C:\Users[USER][FILEPATH]\AR View0.8.0.apk"
stderr[ adb: failed to install C:\Users\USER[FILEPATH]\AR View0.8.0.apk:
Failure [INSTALL_PARSE_FAILED_NOT_APK: Failed to parse /data/app/vmdl1540219450.tmp/base.apk]
stdout [Performing Streamed Install]
exit code: 1
At this point I'm lost on what to do. I have:
Uninstalled/Reinstalled Android Studio
Updated Unity to Current Version
Tried this in a BLANK Unity project and gotten the same error
Made sure that my device (I think?) no longer has any versions of the app present on it.
Created a new signing certificate and tried both new and old..
What else IS there? Thanks for your help!
Answer by JCNemeth · Mar 27, 2019 at 09:47 PM
So, we found a solution!
Reference this:
https://forum.unity.com/threads/gradle-build-failed.647581/
...as the definitive solution. Removing 29.0.0-rc1 from the shown directory results in a perfect build! Might want to look into this as a fix, Unity! Talk with Android on syncing the naming structures or some such. Happy coding everybody!
Your answer
Follow this Question
Related Questions
CommandInvokationFailure: Failed to re-package resources. 1 Answer
Unity plug-in/ Support SDK or 3rd party plug-in to handle Huawei Dynamic ability SDK. 0 Answers
Unable to merge android manifest (Theme.Translucent) 0 Answers
Problem exporting with the sdk android 0 Answers
Unable to merge android manifests while integrating Rewarded Videos from Admob 0 Answers