- Home /
Admob+googleplayservices= CommandInvokationFailure: Failed to re-package resources
I tried a lot of thing here. If i install google play services it's ok. If i install admob if ok too. But if i install them both it fails. I tried this http://answers.unity3d.com/questions/1074000/unity-5-android-build-failed-to-re-package-resourc.html but nothing. Deleting plugins or doing it in a new project. Can somebody help? I was just about to finish the game and now ihave this error with no idea of how to fix it. Thx a lot
CommandInvokationFailure: Failed to re-package resources. See the Console for details. C:\NVPACK\android-sdk-windows\build-tools\23.0.2\aapt.exe package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S "res" -I "C:/NVPACK/android-sdk-windows\platforms\android-23\android.jar" -F bin/resources.ap_ --extra-packages android.support.v7.appcompat:com.google.android.gms:com.google.unity: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 "C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res" -S "C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\google-play-services_lib\res" -S "C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\GoogleMobileAdsPlugin\res" -S "C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\play-services-base-8.3.0\res" -S "C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\play-services-basement-8.3.0\res" -S "C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\play-services-drive-8.3.0\res" -S "C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\play-services-games-8.3.0\res" -S "C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\play-services-nearby-8.3.0\res" -S "C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\play-services-plus-8.3.0\res" -S "C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\support-v4-23.1.1\res"
stderr[ C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\abc_alert_dialog_button_bar_material.xml:18: note: removing attribute http://schemas.android.com/apk/res/android:layoutDirection from C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\abc_alert_dialog_button_bar_material.xml: note: using v17 attributes; synthesizing resource com.twopeoplegames.supermariano:layout/abc_alert_dialog_button_bar_material for configuration v17. C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\abc_alert_dialog_material.xml:48: note: removing attribute http://schemas.android.com/apk/res/android:textAlignment from C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\abc_alert_dialog_material.xml: note: using v17 attributes; synthesizing resource com.twopeoplegames.supermariano:layout/abc_alert_dialog_material for configuration v17. C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\abc_dialog_title_material.xml:29: note: removing attribute http://schemas.android.com/apk/res/android:textAlignment from C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\abc_dialog_title_material.xml: note: using v17 attributes; synthesizing resource com.twopeoplegames.supermariano:layout/abc_dialog_title_material for configuration v17. C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\abc_screen_toolbar.xml:27: note: removing attribute http://schemas.android.com/apk/res/android:touchscreenBlocksFocus from C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\abc_screen_toolbar.xml: note: using v21 attributes; synthesizing resource com.twopeoplegames.supermariano:layout/abc_screen_toolbar for configuration v21. C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\abc_search_view.xml:47: note: removing attribute http://schemas.android.com/apk/res/android:layoutDirection from C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\abc_search_view.xml: note: using v17 attributes; synthesizing resource com.twopeoplegames.supermariano:layout/abc_search_view for configuration v17. C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_big_media.xml:42: note: removing attribute http://schemas.android.com/apk/res/android:layoutDirection from C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_big_media.xml:34: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_big_media.xml:34: note: removing attribute http://schemas.android.com/apk/res/android:layout_toStartOf from C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_big_media.xml: note: using v17 attributes; synthesizing resource com.twopeoplegames.supermariano:layout/notification_template_big_media for configuration v17. C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_big_media_narrow.xml:60: note: removing attribute http://schemas.android.com/apk/res/android:layout_toEndOf from C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_big_media_narrow.xml:46: note: removing attribute http://schemas.android.com/apk/res/android:layout_toEndOf from C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_big_media_narrow.xml:46: note: removing attribute http://schemas.android.com/apk/res/android:layoutDirection from C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_big_media_narrow.xml:38: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_big_media_narrow.xml:38: note: removing attribute http://schemas.android.com/apk/res/android:layout_toStartOf from C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_big_media_narrow.xml:30: note: removing attribute http://schemas.android.com/apk/res/android:layout_alignParentEnd from C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_big_media_narrow.xml: note: using v17 attributes; synthesizing resource com.twopeoplegames.supermariano:layout/notification_template_big_media_narrow for configuration v17. C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_lines.xml:18: note: removing attribute http://schemas.android.com/apk/res/android:paddingEnd from C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_lines.xml:77: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_lines.xml:96: note: removing attribute http://schemas.android.com/apk/res/android:paddingStart from C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_lines.xml:64: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_lines.xml:27: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_lines.xml: note: using v17 attributes; synthesizing resource com.twopeoplegames.supermariano:layout/notification_template_lines for configuration v17. C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_media.xml:43: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginEnd from C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_media.xml:33: note: removing attribute http://schemas.android.com/apk/res/android:layoutDirection from C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_media.xml: note: using v17 attributes; synthesizing resource com.twopeoplegames.supermariano:layout/notification_template_media for configuration v17. C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_part_chronometer.xml:18: note: removing attribute http://schemas.android.com/apk/res/android:paddingStart from C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_part_chronometer.xml: note: using v17 attributes; synthesizing resource com.twopeoplegames.supermariano:layout/notification_template_part_chronometer for configuration v17. C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_part_time.xml:18: note: removing attribute http://schemas.android.com/apk/res/android:paddingStart from C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_part_time.xml: note: using v17 attributes; synthesizing resource com.twopeoplegames.supermariano:layout/notification_template_part_time for configuration v17. C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\select_dialog_multichoice_material.xml:18: note: removing attribute http://schemas.android.com/apk/res/android:paddingStart from C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\select_dialog_multichoice_material.xml:18: note: removing attribute http://schemas.android.com/apk/res/android:paddingEnd from C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\select_dialog_multichoice_material.xml:18: note: removing attribute http://schemas.android.com/apk/res/android:drawableStart from C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\select_dialog_multichoice_material.xml: note: using v13 attributes; synthesizing resource com.twopeoplegames.supermariano:layout/select_dialog_multichoice_material for configuration v13. C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\select_dialog_singlechoice_material.xml:18: note: removing attribute http://schemas.android.com/apk/res/android:paddingStart from C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\select_dialog_singlechoice_material.xml:18: note: removing attribute http://schemas.android.com/apk/res/android:paddingEnd from C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\select_dialog_singlechoice_material.xml:18: note: removing attribute http://schemas.android.com/apk/res/android:drawableStart from C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\select_dialog_singlechoice_material.xml: note: using v13 attributes; synthesizing resource com.twopeoplegames.supermariano:layout/select_dialog_singlechoice_material for configuration v13. C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\drawable\abc_textfield_search_material.xml:19: note: removing attribute http://schemas.android.com/apk/res/android:state_activated from C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\drawable\abc_textfield_search_material.xml: note: using v11 attributes; synthesizing resource com.twopeoplegames.supermariano:drawable/abc_textfield_search_material for configuration v11. C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\select_dialog_multichoice_material.xml:18: note: removing attribute http://schemas.android.com/apk/res/android:paddingStart from C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\select_dialog_multichoice_material.xml:18: note: removing attribute http://schemas.android.com/apk/res/android:paddingEnd from C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\select_dialog_multichoice_material.xml: note: using v17 attributes; synthesizing resource com.twopeoplegames.supermariano:layout/select_dialog_multichoice_material for configuration v17. C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\select_dialog_singlechoice_material.xml:18: note: removing attribute http://schemas.android.com/apk/res/android:paddingStart from C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\select_dialog_singlechoice_material.xml:18: note: removing attribute http://schemas.android.com/apk/res/android:paddingEnd from C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\select_dialog_singlechoice_material.xml: note: using v17 attributes; synthesizing resource com.twopeoplegames.supermariano:layout/select_dialog_singlechoice_material for configuration v17. C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\google-play-services_lib\res\values\base_attrs.xml:11: error: Attribute "buttonSize" has already been defined
C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\google-play-services_lib\res\values\base_attrs.xml:16: error: Attribute "colorScheme" has already been defined
C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\google-play-services_lib\res\values\base_attrs.xml:21: error: Attribute "scopeUris" has already been defined
C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\google-play-services_lib\res\values\common_attrs.xml:13: error: Attribute "imageAspectRatioAdjust" has already been defined
C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\google-play-services_lib\res\values\common_attrs.xml:22: error: Attribute "imageAspectRatio" has already been defined
C:\Users\User\Documents\unitypoyas\hijoputa\Temp\StagingArea\android-libraries\google-play-services_lib\res\values\common_attrs.xml:27: error: Attribute "circleCrop" has already been defined
] stdout[ Configurations: (default)
Files: AndroidManifest.xml
I'm also having the same issue, so would be interested in any responses!
I am having the same issue. @jprocha101: which sdk exactly? I have all the latest Android SD$$anonymous$$s, not helping.
Also, on jar files, how do I know what "extra ones" to get rid of?
$$anonymous$$y jar files:
``` [~/lazyAngus/LazyAngus/Assets (gpgs_exp)]$ find . -name "*.jar" ./FacebookSD$$anonymous$$/Plugins/Android/libs/android-support-v4.jar ./FacebookSD$$anonymous$$/Plugins/Android/libs/bolts-android-1.2.1.jar ./Plugins/Android/google-play-services_lib/libs/google-play-services.jar ./Plugins/Android/Google$$anonymous$$obileAdsPlugin/libs/in-app-billing-service-aidl.jar ./Plugins/Android/Google$$anonymous$$obileAdsPlugin/libs/unity-plugin-library.jar ./Plugins/Android/$$anonymous$$ainLibProj/libs/play-games-plugin-support.jar ./Plugins/Android/Soomla/libs/AndroidStore.jar ./Plugins/Android/Soomla/libs/SoomlaAndroidCore.jar ./Plugins/Android/Soomla/libs/square-otto-1.3.2.jar ./Plugins/Android/Soomla/libs/UnityAndroidStore.jar ./Plugins/Android/Soomla/libs/UnitySoomlaAndroidCore.jar ./Plugins/Android/support-annotations-23.1.1.jar ./WebPlayerTemplates/SoomlaConfig/android/android-billing-services/amazon/AndroidStoreAmazon.jar ./WebPlayerTemplates/SoomlaConfig/android/android-billing-services/amazon/in-app-purchasing-2.0.1.jar ```
Answer by jprocha101 · Dec 03, 2015 at 06:02 AM
I was getting this error a couple weeks ago and updating to the latest Sdk using the Sdk manager solved the issue.
On side note, always make sure you only have one support v4 jar and one play services jar. I think those two plugins each come with their own. You can delete any extra ones as long as you're left with one of each the other plugin will find them.
Answer by jc-drile77 · Jan 04, 2016 at 01:27 PM
I fixed it by deleting a file called settings or smthing like that in the GoogleMobileAdsPlugin folder, idk if it was essential as I havent implemented the package yet, but it builded fine.
PS: Next time put the error in a spoiler or code box ^^
Or try to update your SDK
Your answer
![](https://koobas.hobune.stream/wayback/20220612050538im_/https://answers.unity.com/themes/thub/images/avi.jpg)