Commandinvokationfailure failed to recompile android resource files

Error building Player: CommandInvokationFailure: Failed to recompile android resource files with bundle id have «super» #262

Comments

tnbao91 commented Aug 23, 2016

I use latest version 3.0.5 when I setup my bundle id to «super.geo.chasing» I got this error

CommandInvokationFailure: Failed to recompile android resource files.
C:/Program Files/Java/jdk1.8.0_31\bin\javac.exe -bootclasspath «D:/Soft/Mobile/android-sdk-windows\platforms\android-24\android.jar» -d «D:\workspace\TortoiseSVN\New Unity Project\Temp\StagingArea\bin\classes» -source 1.6 -target 1.6 -encoding UTF-8 «android\support\v4\R.java» «android\support\v7\appcompat\R.java» «com\google\android\gms\R.java» «com\google\android\gms\ads\R.java» «com\google\android\gms\ads\impl\R.java» «com\google\android\gms\base\R.java» «com\google\android\gms\clearcut\R.java» «com\google\android\gms\drive\R.java» «com\google\android\gms\games\R.java» «com\google\android\gms\nearby\R.java» «com\google\android\gms\tasks\R.java» «com\google\unity\R.java» «super\geo\chasing\R.java»

stderr[
super\geo\chasing\R.java:8: error: expected
package super.geo.chasing;
^
super\geo\chasing\R.java:8: error: class, interface, or enum expected
package super.geo.chasing;
^
super\geo\chasing\R.java:8: error: class, interface, or enum expected
package super.geo.chasing;
^
3 errors
]
stdout[

]
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.PostProcessor.Tasks.TasksCommon.Exec (System.String command, System.String args, System.String workingdir, System.String errorMsg)
UnityEditor.Android.PostProcessor.Tasks.BuildResources.CompileResources (UnityEditor.Android.PostProcessor.PostProcessorContext context)
UnityEditor.Android.PostProcessor.Tasks.BuildResources.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context)
UnityEditor.HostView:OnGUI()

The text was updated successfully, but these errors were encountered:

Источник

Another «CommandInvokationFailure: Failed to re-package resources.» #231

Comments

tomski174 commented Jun 4, 2016

I am very new to unity and game development. Currently writing my second simple game and I have had some problems compiling the code after adding GoogleMobileAds plugin. I have tried to search the web for many hours now and have tried various suggested solutions however the issue still persists. I would be so grateful if someone could point me in the right direction. Thank you!

CommandInvokationFailure: Failed to re-package resources. See the Console for details.
C:\Users\Tom\AppData\Local\Android\sdk\build-tools\23.0.2\aapt.exe package —auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S «res» -I «C:/Users/Tom/AppData/Local/Android/sdk\platforms\android-23\android.jar» -F bin/resources.ap_ —extra-packages android.support.v7.appcompat:com.google.firebase:com.google.unity:com.google.android.gms.ads.impl:com.google.android.gms.ads:com.google.android.gms.auth:com.google.android.gms.base:com.google.android.gms:com.google.android.gms.drive:com.google.android.gms.games:com.google.android.gms.nearby:com.google.android.gms.tasks:android.support.v4 -S «C:\Users\Public\Documents\Unity Projects\Tower Full\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res» -S «C:\Users\Public\Documents\Unity Projects\Tower Full\Temp\StagingArea\android-libraries\firebase-common-9.0.1\res» -S «C:\Users\Public\Documents\Unity Projects\Tower Full\Temp\StagingArea\android-libraries\play-services-ads-9.0.1\res» -S «C:\Users\Public\Documents\Unity Projects\Tower Full\Temp\StagingArea\android-libraries\play-services-ads-lite-9.0.1\res» -S «C:\Users\Public\Documents\Unity Projects\Tower Full\Temp\StagingArea\android-libraries\play-services-auth-base-9.0.1\res» -S «C:\Users\Public\Documents\Unity Projects\Tower Full\Temp\StagingArea\android-libraries\play-services-base-9.0.1\res» -S «C:\Users\Public\Documents\Unity Projects\Tower Full\Temp\StagingArea\android-libraries\play-services-basement-9.0.1\res» -S «C:\Users\Public\Documents\Unity Projects\Tower Full\Temp\StagingArea\android-libraries\play-services-drive-9.0.1\res» -S «C:\Users\Public\Documents\Unity Projects\Tower Full\Temp\StagingArea\android-libraries\play-services-games-9.0.1\res» -S «C:\Users\Public\Documents\Unity Projects\Tower Full\Temp\StagingArea\android-libraries\play-services-nearby-9.0.1\res» -S «C:\Users\Public\Documents\Unity Projects\Tower Full\Temp\StagingArea\android-libraries\play-services-tasks-9.0.1\res» -S «C:\Users\Public\Documents\Unity Projects\Tower Full\Temp\StagingArea\android-libraries\support-v4-23.1.1\res»

Files:
AndroidManifest.xml
Src: () AndroidManifest.xml

Читайте также:  Lens android что это такое

Resource Dirs:
Including resources from package: C:\Users\Tom\AppData\Local\Android\sdk\platforms\android-23\android.jar
applyFileOverlay for drawable
trying overlaySet Key=common_full_open_on_phone.png
trying overlaySet Key=common_google_signin_btn_icon_dark.xml
trying overlaySet Key=common_google_signin_btn_icon_dark_disabled.9.png
trying overlaySet Key=common_google_signin_btn_icon_dark_focused.9.png
trying overlaySet Key=common_google_signin_btn_icon_dark_normal.9.png
trying overlaySet Key=common_google_signin_btn_icon_dark_pressed.9.png
trying overlaySet Key=common_google_signin_btn_icon_light.xml
trying overlaySet Key=common_google_signin_btn_icon_light_disabled.9.png
trying overlaySet Key=common_google_signin_btn_icon_light_focused.9.png
trying overlaySet Key=common_google_signin_btn_icon_light_normal.9.png
trying overlaySet Key=common_google_signin_btn_icon_light_pressed.9.png
trying overlaySet Key=common_google_signin_btn_text_dark.xml
trying overlaySet Key=common_google_signin_btn_text_dark_disabled.9.png
trying overlaySet Key=common_google_signin_btn_text_dark_focused.9.png
trying overlaySet Key=common_google_signin_btn_text_dark_normal.9.png
trying overlaySet Key=common_google_signin_btn_text_dark_pressed.9.png
trying overlaySet Key=common_google_signin_btn_text_light.xml
trying overlaySet Key=common_google_signin_btn_text_light_disabled.9.png
trying overlaySet Key=common_google_signin_btn_text_light_focused.9.png
trying overlaySet Key=common_google_signin_btn_text_light_normal.9.png
trying overlaySet Key=common_google_signin_btn_text_light_pressed.9.png
trying overlaySet Key=common_ic_googleplayservices.png
trying overlaySet Key=common_plus_signin_btn_icon_dark.xml
trying overlaySet Key=common_plus_signin_btn_icon_dark_disabled.9.png
trying overlaySet Key=common_plus_signin_btn_icon_dark_focused.9.png
trying overlaySet Key=common_plus_signin_btn_icon_dark_normal.9.png
trying overlaySet Key=common_plus_signin_btn_icon_dark_pressed.9.png
trying overlaySet Key=common_plus_signin_btn_icon_light.xml
trying overlaySet Key=common_plus_signin_btn_icon_light_disabled.9.png
trying overlaySet Key=common_plus_signin_btn_icon_light_focused.9.png
trying overlaySet Key=common_plus_signin_btn_icon_light_normal.9.png
trying overlaySet Key=common_plus_signin_btn_icon_light_pressed.9.png
trying overlaySet Key=common_plus_signin_btn_text_dark.xml
trying overlaySet Key=common_plus_signin_btn_text_dark_disabled.9.png
trying overlaySet Key=common_plus_signin_btn_text_dark_focused.9.png
trying overlaySet Key=common_plus_signin_btn_text_dark_normal.9.png
trying overlaySet Key=common_plus_signin_btn_text_dark_pressed.9.png
trying overlaySet Key=common_plus_signin_btn_text_light.xml
trying overlaySet Key=common_plus_signin_btn_text_light_disabled.9.png
trying overlaySet Key=common_plus_signin_btn_text_light_focused.9.png
trying overlaySet Key=common_plus_signin_btn_text_light_normal.9.png
trying overlaySet Key=common_plus_signin_btn_text_light_pressed.9.png
trying overlaySet Key=abc_ab_share_pack_mtrl_alpha.9.png
trying overlaySet Key=abc_action_bar_item_background_material.xml
trying overla

The text was updated successfully, but these errors were encountered:

Источник

Error building Player: CommandInvokationFailure: Failed to re-package resources. See the Console for details. #900

Comments

OwlGames commented Jan 7, 2016

Help me please!
I’m two days trying to resolve this problem. Nothing work 🙁

Error building Player: CommandInvokationFailure: Failed to re-package resources. See the Console for details.
C:\Program Files\Android\android-sdk\build-tools\23.0.2\aapt.exe package —auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S «res» -I «C:/Program Files/Android/android-sdk\platforms\android-22\android.jar» -F bin/resources.ap_ —extra-packages android.support.v7.appcompat:com.google.example.games.mainlibproj:com.google.android.gms.base:com.google.android.gms:com.google.android.gms.drive:com.google.android.gms.games:com.google.android.gms.nearby:com.google.android.gms.plus:android.support.v4 -S

The text was updated successfully, but these errors were encountered:

claywilkinson commented Jan 7, 2016

Earlier in the console output it will list the error. You have a duplicate resource or jar. Once you delete one of the copies from your project it will build. Can you share your Unity version, and the contents of Assets/Plugins/Android?

OwlGames commented Jan 8, 2016

Thanks for the feedback.
The version of My Unity is 5.1.3f ( 64x )

I’m trying to find a possible duplicity as you suggested . Interestingly, even I open a new project and importing the plugin and example » minimal» , the error occurs .

I noticed that within the plugin / android folder was not created RES folder to configure the plugin with my ID .

Delanir commented Jan 11, 2016

I’m experiencing the same issues as @OwlGames and so far I was unable to find duplicates.

My project tree matches the image. I’ve tried to downgrade the plug-in to version 0.9.21, but I’m afraid that version isn’t compatible with Unity 5.3.1p1 (for example the Logger class from OurGameUtils is considered to be ambiguous).

While comparing the Manifest files under MainLibProj from versions 0.9.21 and 0.9.27 I noticed the APP_ID field is not set in version 0.9.27.

Is this manifest excerpt correct?

claywilkinson commented Jan 11, 2016

The App_ID property is specific to your project. It is set when you run setup for the plugin from Window > Google Play Games > Setup > Android Setup.

The latest version of the plugin has changed to using a fully qualified name for Logger, so there are no conflicts with Unity’s.

claywilkinson commented Jan 11, 2016

@OwlGames — can you look in the log messages and see what the error is? Specifically what is the duplicate or missing resource?

OwlGames commented Jan 11, 2016

Yesnoff course. Is a missing resourse.
Im not im my computer now, i send this for you in about 3 hours.

Читайте также:  Чем сделать живые обои для андроида

OwlGames commented Jan 11, 2016

Hi claywilkinson,
the resource missing is :
‘android:TextAppearance.Material.Widget.Button.Inverse’
‘android:Widget.Material.Button.Colored’.

.
stderr[
C:\Users\Public\Documents\OWLGAMES\New Unity Project\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\values-v23\values-v23.xml:5: error: Error retrieving parent for item: No resource found that matches the given name ‘android:TextAppearance.Material.Widget.Button.Inverse’.
C:\Users\Public\Documents\OWLGAMES\New Unity Project\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\values-v23\values-v23.xml:30: error: Error retrieving parent for item: No resource found that matches the given name ‘android:Widget.Material.Button.Colored’.
]
stdout[
Configurations:
(default)
Files:
AndroidManifest.xml
Src: () AndroidManifest.xml
Resource Dirs:
Including resources from package: C:\Program Files (x86)\Android\android-sdk\platforms\android-22\android.jar
applyFileOverlay for drawable
.

look the diference in version:

in the version 0.9.27 i dont have the folder google-play-services-lib

claywilkinson commented Jan 11, 2016

The newer versions of the plugin remove the google-play-services_lib since most of it is not used in a game, and it bloats the apk by about 50% for a small game.

The styles in question are defined in the android-23 SDK — can you update the SDK via sdk manager and re-run setup for the plugin?

Delanir commented Jan 11, 2016

Thank you so much @claywilkinson , downloading android-23 SDK Platform fixed this issue.

OwlGames commented Jan 11, 2016

Hi @claywilkinson, thx again, my build version is 23.1 :/

claywilkinson commented Jan 11, 2016

Those are the build tools. What about the platform SDK?

OwlGames commented Jan 11, 2016

Oooops, Sorry! I use API 22. :S
Im downloading API 23 now thx so much @claywilkinson .

claywilkinson commented Jan 11, 2016

Great! 👍 Please re-open this if that did not work for you.

zodlanier commented Feb 25, 2016

Hi @claywilkinson, i am having the same trouble but my API is already 23. The error log is as shown below:

Error building Player: CommandInvokationFailure: Failed to re-package resources. See the Console for details.
/Users/admin/Downloads/android-sdk-macosx/build-tools/23.0.2/aapt package —auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S «res» -I «/Users/admin/Downloads/android-sdk-macosx/platforms/android-23/android.jar» -F bin/resources.ap_ —extra-packages com.google.unity:com.google.example.games.mainlibproj:android.support.v7.appcompat:com.amazon.ags:com.google.android.gms:com.google.android.gms.ads:com.google.android.gms:android.support.v4 -S

Do you have any suggestions for the fix? I am using Unity 5.3.2p, Google AdMobs Unity Plugin v3.0.0 and CloudOnce plugin 1.8.1. Thank you!

hanhnd76 commented Apr 22, 2016

@zodlanier Did you resolve the trouble? I am getting the same

TTAliA commented Jun 3, 2016

Same issue here. Anyone?

blookmaker commented Jun 22, 2016

Same issue here too . have somebody been able to fix the issue ?

JasonWCook commented Jun 28, 2016

I used to be able to build APK’s just fine then my Windows died and went into a Repair loop. Once I reinstalled Windows 8, and unity along with both of the required installations (Android SDK, JDK) I could no longer build an APK without receiving this issue. I’ve followed the Unity — Android set up instructions exactly and even reinstalled everything twice. I just want to finish my project!

blookmaker commented Jun 29, 2016

hi @JasonWCook
it seems that you have downloaded the api 24 in your android-sdk ,
i believe that the solution for you is to delete the 24 folder under the android-sdk-windows\build-tools in your android sdk location .

JasonWCook commented Jun 29, 2016

HEY @blookmaker Thank you so much! It builds!

MirkoFabris commented Jun 30, 2016

YES! Remove everything with 24 and it works. Thanks!

adamcarmichael commented Jul 3, 2016

Hey @blookmaker, having a similar issue and it’s driving me insane! Here is my log:

CommandInvokationFailure: Failed to re-package resources. See the Console for details.
/Users/adamcarmichael/Library/Android/sdk/build-tools/23.0.1/aapt package —auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S «res» -I «/Users/adamcarmichael/Library/Android/sdk/platforms/android-23/android.jar» -F bin/resources.ap_ —extra-packages com.google.unity:com.heyzap:android.support.v7.appcompat:com.google.android.gms:com.google.android.gms.ads.impl:com.google.android.gms.ads:com.google.android.gms.base:com.google.android.gms:com.google.android.gms.clearcut:com.google.android.gms:com.google.android.gms.tasks:android.support.v4 -S «/Users/adamcarmichael/Dropbox/Microwave Games/Games/Vex/Vex Mobile/2015/Vex/Temp/StagingArea/android-libraries/GoogleMobileAdsPlugin/res» -S «/Users/adamcarmichael/Dropbox/Microwave Games/Games/Vex/Vex Mobile/2015/Vex/Temp/StagingArea/android-libraries/appcompat-v7-23.1.1/res» -S «/Users/adamcarmichael/Dropbox/Microwave Games/Games/Vex/Vex Mobile/2015/Vex/Temp/StagingArea/android-libraries/google-play-services_lib/res» -S «/Users/adamcarmichael/Dropbox/Microwave Games/Games/Vex/Vex Mobile/2015/Vex/Temp/StagingArea/android-libraries/play-services-ads-9.2.0/res» -S «/Users/adamcarmichael/Dropbox/Microwave Games/Games/Vex/Vex Mobile/2015/Vex/Temp/StagingArea/android-libraries/play-services-ads-lite-9.2.0/res» -S «/Users/adamcarmichael/Dropbox/Microwave Games/Games/Vex/Vex Mobile/2015/Vex/Temp/StagingArea/android-libraries/play-services-base-9.2.0/res» -S «/Users/adamcarmichael/Dropbox/Microwave Games/Games/Vex/Vex Mobile/2015/Vex/Temp/StagingArea/android-libraries/play-services-basement-9.2.0/res» -S «/Users/adamcarmichael/Dropbox/Microwave Games/Games/Vex/Vex Mobile/2015/Vex/Temp/StagingArea/android-libraries/play-services-clearcut-9.2.0/res» -S «/Users/adamcarmichael/Dropbox/Microwave Games/Games/Vex/Vex Mobile/2015/Vex/Temp/StagingArea/android-libraries/play-services-gass-9.2.0/res» -S «/Users/adamcarmichael/Dropbox/Microwave Games/Games/Vex/Vex Mobile/2015/Vex/Temp/StagingArea/android-libraries/play-services-tasks-9.2.0/res» -S «/Users/adamcarmichael/Dropbox/Microwave Games/Games/Vex/Vex Mobile/2015/Vex/Temp/StagingArea/android-libraries/support-v4-23.1.1/res»

Читайте также:  Doodle mafia для андроид

Any ideas? I’m using Unity 5.3.5p2. Thanks again!

blookmaker commented Jul 3, 2016

I suppose that you have already tried to remove the 24 folder from the android sdk , if so , then be sure that you don’t have duplicated libs in your project .
Was your project able to build before adding Google play services plug-in to your project ?

adamcarmichael commented Jul 3, 2016

Yes I have deleted the 24, here is what my SDK Manager looks like and my folders. Would a duplicated lib be a folder containing the same files as another? Apologies this is my first project for Android. Also it did build successfully before I added the services.

blookmaker commented Jul 4, 2016

here how my Build tools folder looks like .

I don’t know exactly what is the problem you are facing but here are some tips you can start with to fix your issue .
create a new unity project and add the Google play game services to your project . then try to build it .
If it builds then your android sdk configuration have nothing to do with the issue .
i don’t know if you have already tried this or not .
if your project can’t build with your current android sdk configuration . then the solution to your problem is to update your android sdk via android sdk manager .
Go to extras and update Google play services , and other items such as Google play services , android support repository and Google Repository .
by your screenshot i guess that you need also to install the 23.0.3 Build tools directory .
i am pretty sure that if your android sdk is still not up to date , then the problem is coming from their .

adamcarmichael commented Jul 4, 2016

On the new project the error appears so it must be my configuration. Could you possibly send me screenshots of everything package you have installed so I could compare it to my own?

blookmaker commented Jul 4, 2016

yes sure .




ensure that the last ones in extra are up to date hope that this will solve your problem

blookmaker commented Jul 5, 2016

Where you able to fix your issue @JasonWCook ?

TTAliA commented Jul 7, 2016 •

I’m having the same issue. this is just disgusting.

Usually I delete the support aar files but doesn’t seem to work this time.

We use Charboost, Admob, GoogePlay, UnityPurchasing, Here’s what’s in my Android folder:

linhnguyenthaitung commented Jul 9, 2016

Hello every one. This issues was driving me crazy for the entire afternoon. Apparently you need to delete the Android SDK Platform-Tools rev 24, Android SDK Build-tools rev 24 and build inside Unity. Unity then will prompt you that you need to update those stuffs, press OK and let Unity download those by itself >> problem sovled

flo-wolf commented Oct 15, 2016

Anyone found a solution to this? For me none of the above given fixes worked.

Источник

Оцените статью