0

I have followed setting up my PC step by step to build for Samsung Gear VR using unity. I have deleted and reinstalled all the SDK and JDK (and Unity) several times and followed half a dozen step by step tutorials but I am still getting the following errors:

CommandInvokationFailure: Failed to re-package resources. See the Console for details.

U:\Users\VR.FIRST\AppData\Local\Android\android-sdk\build-tools\24.0.0\aapt.exe package 
--auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S "res" 
-I "U:/Users/VR.FIRST/AppData/Local/Android/android-sdk\platforms\android-24\android.jar" 
-F bin/resources.ap_ --extra-packages com.oculus.Integration 
-S "U:\Users\VR.FIRST\Desktop\OculusMobileSDK\VrSamples\Native\CinemaSDK\Temp\StagingArea\android-libraries\ovrplugin\res"

UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.PostProcessAndroidPlayer.Exec (System.String command, System.String args, System.String workingdir, System.String[] progress_strings, Single progress_value, System.String errorMsg)
UnityEditor.Android.PostProcessAndroidPlayer.CompileResources (System.String stagingArea, System.String packageName, UnityEditor.Android.AndroidLibraries androidLibraries)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcessInternal (System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry)
UnityEditor.HostView:OnGUI()
Axarydax
  • 16,353
  • 21
  • 92
  • 151
Sami Hamid
  • 61
  • 3
  • check my answer : http://stackoverflow.com/a/38076937/4366237 – Umair M Jul 11 '16 at 15:51
  • @umairM there was no version.xml in any of my google play folders. Thanks but this answer did not help. – Sami Hamid Jul 11 '16 at 17:59
  • Try to only **Build** it instead of **Build and Run** and let me know if it builds successfully. – Programmer Jul 11 '16 at 18:20
  • No it doesn't work. I only trying to build. It fails to built at all. I have now followed the same steps on my other PC and get the same result so it cant be a PC problem 1) Install Android SDKs (ive installed all of them) + studio 2) Install JDK 3) Install Unity3D 4) Ensure Unity3D pref finds both SDK & JDK 5) Ensure all settings are fine on the build options. I should point out that until the recent update of Unity in which I needed to install Android as a separate plugin I was able to successfully build SDKs – Sami Hamid Jul 11 '16 at 19:28

1 Answers1

0

http://answers.unity3d.com/questions/653814/android-build-error-win-32-aaptexe-.html

This answered my question. It seems this is a BUG with unity.

Sami Hamid
  • 61
  • 3