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!

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!