Error creating a player for Android in Unity?

Error building Player: CommandInvokationFailure: Failed to re-package resources. See the Console for details. C:\Users\4story\AppData\Local\Android\sdk\build-tools\24.0.0-preview\aapt.exe package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S "res" -I "C:/Users/4story/AppData/Local/Android/sdk\platforms\android-23\android.jar" -F bin/resources.ap_ stderr[ ] stdout[ ] 

Please help me fix this. Why can't I build my project? I am new to unity.

EDIT: SINGLE VERSION: 5.3.4f1 64 bit Minimum api 10 aka 2.3.3 gingerbread (Note for sdk manager loading the sdk platform for gingerbread cookies is not available for windows, so I havenโ€™t downloaded it ... should I use a higher api?) Android sdk tools 25.1.1

Can I create an empty Android project? I mean, I made games with android studio, and everything worked like a charm, but unity could not be built. Am I using a plugin? What is it?

There. Can you help me?

EDIT2 : I did not expect something to change, and it is not an empty project, it does not matter, the repacking of resources still fails. Does minimal API mean? (in an empty project, I tried 2.3.1 (which was by itself) and 6.0 (because I have everything installed there with the sdk manager))

Are SDK platforms installed? It would help me to say that I get 2 error messages, above and another, which is ONLY LOVED, as mentioned above, but below everything has this

 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() 

You can also mention that I have to update the package ID every time I create a new project.

Thanks for the help so far. Really appreciated.

EDIT3 The Android sdk folder was more like [...] / appdata / local / android / sdk, and now it looks like C: \ AndroidSDK \ Android \ sdk (not Android-sdk, if thatโ€™s not what you meant ) So the first part did nothing

However, when I downloaded sdk, you provided me, I could build a project just fine! Thanks for your help. A lot of. I even tested it on a real device and it worked. I didnโ€™t even need to download Unity 5.4 beta, I think it was just the wrong sdk. Thanks again.

+3
android build unity3d
Apr 30 '16 at 17:25
source share
1 answer

I do not know what causes this problem, but do the following below. The problem will be fixed by the time of completion.

1 . Make sure there is no in the SDKpath. Therefore, create a folder named AndroidSDK in the C directory.

2 . Copy the Android-sdk folder to the C:/AndroidSDK .

Your path to the SDK should now look like this:

 C:/AndroidSDK/Android-sdk 

3 . Update your Android SDK file in the Unity editor.

Now check if this works by trying to create again for Android.

If this fails, continue from below.

4 . Download the beta version of Unity 5.4 .

5 . Reboot the SDK , then copy the file to C:/AndroidSDK/Android-sdk .

6 . Go back to Unity and update the path

enter image description here

7 . Create an Android project again, it will display an error and ask you to update the SDK.

enter image description here

Click "buttom" Update Android SDK . Unity will automatically update your SDK. Then your SDK should look something like below. Your problem should be missed.

enter image description here

+4
Apr 30 '16 at 19:47
source share



All Articles