cancel
Showing results for 
Search instead for 
Did you mean: 

Parsing Package Error from Unity?

ColdSpike
Explorer
I've finally built a test APK for my game for the GearVR but when I tried to install it on my phone, I got "There was a problem parsing the package." error and it refuses to install it, basically. Won't tell me why. I tried all sorts of player settings in Unity before I built but nothing works.
10 REPLIES 10

ColdSpike
Explorer
I can almost get this to work when I tell Unity 2017.1.0f3 to build and run as it's trying to copy and final build into my phone right at the end, but then it fails with the following errors:

What I do not understand about these errors is the fact that the GearVR requirements page clearly states version 5.0 of android must be set to the min and my project settings are set to that. Even if I tell Unity to do API 25, it refuses to work.

Using Windows 10 64 Bit with the latest version of Unity
Android Studio is the latest version that will work as the real latest version, 26, has issues with the GearVR atm so using a work around. Could that be it? If so, what should I do since the latest version will not build for Android.

Using a Galaxy S7 with the latest AT&T OS. I should point out that, on my computer, even though the Samsung drivers are installed and working, the command adb devices refuses to work so I am using my old project's file that was generated from that which should still work? Please, any help would be so amazing.

First 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. 
C:\Users\Tyler\AppData\Local\Android\Sdk\platform-tools\adb.exe -s "b6164afa" install -r "C:\Users\Tyler\Desktop\UnicornVR2.apk"

stderr[
Failed to install C:\Users\Tyler\Desktop\UnicornVR2.apk: Failure [INSTALL_FAILED_OLDER_SDK: Failed parse during installPackageLI: /mnt/expand/a0440c29-8473-46f5-afc5-60868fdd86f1/app/vmdl2029952184.tmp/base.apk (at Binary XML file line #3): Requires newer sdk version #25 (current version is #24)]
]
stdout[

]
exit code: 1
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.ADB.RunInternal (System.String[] command, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.ADB.Run (System.String[] command, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.AndroidDevice.Exec (System.String[] command, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.AndroidDevice.Install (System.String apkfile, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit)
UnityEditor.Android.AndroidDeploymentTargetsExtension+<UploadAPK>c__AnonStorey2.<>m__0 ()
UnityEditor.Android.AndroidDeploymentTargetsExtension.UploadAPK (UnityEditor.BuildReporting.BuildReport buildReport, UnityEditor.Android.AndroidDevice device, UnityEditor.ProgressTaskManager taskManager)
UnityEditor.Android.AndroidDeploymentTargetsExtension+<LaunchBuildOnTarget>c__AnonStorey1.<>m__0 ()
UnityEditor.ProgressTaskManager.Run () (at C:/buildslave/unity/build/Editor/Mono/Utils/ProgressBarUtils.cs:71)
UnityEditor.Android.AndroidDeploymentTargetsExtension.LaunchBuildOnTarget (UnityEditor.BuildReporting.BuildReport buildReport, DeploymentTargetId targetId, UnityEditor.ProgressHandler progressHandler)
UnityEditor.DeploymentTargets.DeploymentTargetManager.LaunchBuildOnTarget (BuildTargetGroup targetGroup, UnityEditor.BuildReporting.BuildReport buildReport, DeploymentTargetId targetId, UnityEditor.ProgressHandler progressHandler) (at C:/buildslave/unity/build/Editor/Mono/DeploymentTargets/DeploymentTargetManager.cs:36)
UnityEditor.PostprocessBuildPlayer+<Launch>c__AnonStorey0.<>m__1 () (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:173)
UnityEditor.ProgressTaskManager.Run () (at C:/buildslave/unity/build/Editor/Mono/Utils/ProgressBarUtils.cs:71)
UnityEditor.PostprocessBuildPlayer.Launch (BuildTargetGroup targetGroup, BuildTarget buildTarget, System.String path, System.String productName, BuildOptions options, UnityEditor.BuildReporting.BuildReport buildReport) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:189)
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()

Second 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. 
C:\Users\Tyler\AppData\Local\Android\Sdk\platform-tools\adb.exe -s "b6164afa" install -r "C:\Users\Tyler\Desktop\UnicornVR2.apk"

stderr[
Failed to install C:\Users\Tyler\Desktop\UnicornVR2.apk: Failure [INSTALL_FAILED_OLDER_SDK: Failed parse during installPackageLI: /mnt/expand/a0440c29-8473-46f5-afc5-60868fdd86f1/app/vmdl2029952184.tmp/base.apk (at Binary XML file line #3): Requires newer sdk version #25 (current version is #24)]
]
stdout[

]
exit code: 1

Final Error:
UnityEditor.BuildPlayerWindow+BuildMethodException: Build failed with errors.
  at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (BuildPlayerOptions options) [0x001b9] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:162 
  at UnityEditor.BuildPlayerWindow.CallBuildMethods (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x00050] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:83 
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()

oculus_gabor
Protege
Failed to install C:\Users\Tyler\Desktop\UnicornVR2.apk: Failure [INSTALL_FAILED_OLDER_SDK: Failed parse during installPackageLI: /mnt/expand/a0440c29-8473-46f5-afc5-60868fdd86f1/app/vmdl2029952184.tmp/base.apk (at Binary XML file line #3): Requires newer sdk version #25 (current version is #24)]

That is the error. Your app is requiring a minimum sdk version 25 (Android 7.1), but the phone is version 24 (Android 7.0). Either update your phones operating system (If that's available, idk), or set the minimum sdk level in unity to 24.

ColdSpike
Explorer


Failed to install C:\Users\Tyler\Desktop\UnicornVR2.apk: Failure [INSTALL_FAILED_OLDER_SDK: Failed parse during installPackageLI: /mnt/expand/a0440c29-8473-46f5-afc5-60868fdd86f1/app/vmdl2029952184.tmp/base.apk (at Binary XML file line #3): Requires newer sdk version #25 (current version is #24)]

That is the error. Your app is requiring a minimum sdk version 25 (Android 7.1), but the phone is version 24 (Android 7.0). Either update your phones operating system (If that's available, idk), or set the minimum sdk level in unity to 24.

I've tried several different settings for the min SDK in Unity under the player settings. It always gives me the same error.

ColdSpike
Explorer
I got nothing. Even creating a blank project in 5.6 and enabling VR support then hitting build makes the manifest error. Could that mean Android Tools is just buggy?

ColdSpike
Explorer
Any suggestions or fixes would be greatly appreciated at this point. I've tried blank projects in both 5.6 and 2017 Unity just to see if they would install or run on my phone and still parsing error.

ColdSpike
Explorer


@ColdSpike

Can you upgrade your phones operating system? You are most likely on a lower API than your build, which means it is encountering a parse error upon attempted install.

Also, have you followed the setup for your software environment for mobile? If adb is not working, your environmental variables are most likely not setup or configured incorrectly.

Please see the step by step documentation here for reference:

https://developer.oculus.com/documentation/unity/latest/concepts/unity-mobileprep/


I'm pretty sure I did all of that, but I can double check again. I do know my software on my phone is fully up to date, so I just don't get it.

ColdSpike
Explorer


@ColdSpike

Can you upgrade your phones operating system? You are most likely on a lower API than your build, which means it is encountering a parse error upon attempted install.

Also, have you followed the setup for your software environment for mobile? If adb is not working, your environmental variables are most likely not setup or configured incorrectly.

Please see the step by step documentation here for reference:

https://developer.oculus.com/documentation/unity/latest/concepts/unity-mobileprep/


I should point out that my Galaxy S7 at&t model phone is running Android 7.0 which, according to it, is the latest version for the moment.

ColdSpike
Explorer
So I finally got adb devices to see my phone when plugged into my PC. I followed every step and attempted a build and run, same errors. It keeps telling me my api needs to be higher. My phone, a galaxy s7, is very much up to date. So what am I missing here?

juanoldinho
Heroic Explorer
Can you provide the contents of your AndroidManifest.xml file?
Please tag me, @juanoldinho, in your forum post/response if you need immediate assistance or want additional support or context on an issue you are having with our software or integrations.

Having an issue with our platform, services, or integrations?

Try using our new bug tool to report this and receive emailed updates as we proceed to address it internally.