Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
tomski174 opened this issue Jun 4, 2016 · 17 comments
Closed

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

tomski174 opened this issue Jun 4, 2016 · 17 comments

Comments

@tomski174
Copy link

@tomski174 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"

stderr[
C:\Users\Public\Documents\Unity Projects\Tower Full\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 <android.support.v7.widget.ButtonBarLayout>
C:\Users\Public\Documents\Unity Projects\Tower Full\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.nutcake.stackking:layout/abc_alert_dialog_button_bar_material for configuration v17.
C:\Users\Public\Documents\Unity Projects\Tower Full\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 <android.support.v7.widget.DialogTitle>
C:\Users\Public\Documents\Unity Projects\Tower Full\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\abc_alert_dialog_material.xml: note: using v17 attributes; synthesizing resource com.nutcake.stackking:layout/abc_alert_dialog_material for configuration v17.
C:\Users\Public\Documents\Unity Projects\Tower Full\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\Public\Documents\Unity Projects\Tower Full\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\abc_dialog_title_material.xml: note: using v17 attributes; synthesizing resource com.nutcake.stackking:layout/abc_dialog_title_material for configuration v17.
C:\Users\Public\Documents\Unity Projects\Tower Full\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 <android.support.v7.widget.ActionBarContainer>
C:\Users\Public\Documents\Unity Projects\Tower Full\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\abc_screen_toolbar.xml: note: using v21 attributes; synthesizing resource com.nutcake.stackking:layout/abc_screen_toolbar for configuration v21.
C:\Users\Public\Documents\Unity Projects\Tower Full\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\Public\Documents\Unity Projects\Tower Full\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\abc_search_view.xml: note: using v17 attributes; synthesizing resource com.nutcake.stackking:layout/abc_search_view for configuration v17.
C:\Users\Public\Documents\Unity Projects\Tower Full\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\Public\Documents\Unity Projects\Tower Full\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\Public\Documents\Unity Projects\Tower Full\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\Public\Documents\Unity Projects\Tower Full\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_big_media.xml: note: using v17 attributes; synthesizing resource com.nutcake.stackking:layout/notification_template_big_media for configuration v17.
C:\Users\Public\Documents\Unity Projects\Tower Full\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\Public\Documents\Unity Projects\Tower Full\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\Public\Documents\Unity Projects\Tower Full\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\Public\Documents\Unity Projects\Tower Full\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\Public\Documents\Unity Projects\Tower Full\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\Public\Documents\Unity Projects\Tower Full\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\Public\Documents\Unity Projects\Tower Full\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_big_media_narrow.xml: note: using v17 attributes; synthesizing resource com.nutcake.stackking:layout/notification_template_big_media_narrow for configuration v17.
C:\Users\Public\Documents\Unity Projects\Tower Full\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\Public\Documents\Unity Projects\Tower Full\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\Public\Documents\Unity Projects\Tower Full\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\Public\Documents\Unity Projects\Tower Full\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\Public\Documents\Unity Projects\Tower Full\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\Public\Documents\Unity Projects\Tower Full\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_lines.xml: note: using v17 attributes; synthesizing resource com.nutcake.stackking:layout/notification_template_lines for configuration v17.
C:\Users\Public\Documents\Unity Projects\Tower Full\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\Public\Documents\Unity Projects\Tower Full\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\Public\Documents\Unity Projects\Tower Full\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_media.xml: note: using v17 attributes; synthesizing resource com.nutcake.stackking:layout/notification_template_media for configuration v17.
C:\Users\Public\Documents\Unity Projects\Tower Full\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\Public\Documents\Unity Projects\Tower Full\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_part_chronometer.xml: note: using v17 attributes; synthesizing resource com.nutcake.stackking:layout/notification_template_part_chronometer for configuration v17.
C:\Users\Public\Documents\Unity Projects\Tower Full\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\Public\Documents\Unity Projects\Tower Full\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_part_time.xml: note: using v17 attributes; synthesizing resource com.nutcake.stackking:layout/notification_template_part_time for configuration v17.
C:\Users\Public\Documents\Unity Projects\Tower Full\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\Public\Documents\Unity Projects\Tower Full\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\Public\Documents\Unity Projects\Tower Full\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\select_dialog_multichoice_material.xml: note: using v17 attributes; synthesizing resource com.nutcake.stackking:layout/select_dialog_multichoice_material for configuration v17.
C:\Users\Public\Documents\Unity Projects\Tower Full\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\Public\Documents\Unity Projects\Tower Full\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\Public\Documents\Unity Projects\Tower Full\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\select_dialog_singlechoice_material.xml: note: using v17 attributes; synthesizing resource com.nutcake.stackking:layout/select_dialog_singlechoice_material for configuration v17.
AndroidManifest.xml:13: Tag attribute authorities has invalid character '$'.
]
stdout[
Configurations:
(default)

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

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

@nxsm

This comment has been minimized.

Copy link

@nxsm nxsm commented Jun 5, 2016

Could you post your AndroidManifest content which is inside Plugins\Android\GoogleMobileAdsPlugin folder, please.

@tomski174

This comment has been minimized.

Copy link
Author

@tomski174 tomski174 commented Jun 5, 2016

sorry not sure if it is displaying the whole file, i'm copying all the content but doesn't seem to show everything in the preview.


> 
> <?xml version="1.0" encoding="utf-8"?>
> 
> <manifest xmlns:android="http://schemas.android.com/apk/res/android"
>     package="com.google.unity"
>     android:versionName="1.0"
>     android:versionCode="1">
>   <uses-sdk android:minSdkVersion="9"
>       android:targetSdkVersion="19" />
>   <!-- Google Mobile Ads Permissions -->
>   <uses-permission android:name="android.permission.INTERNET"/>
>   <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
>   <!-- Uncomment to add billing for in-app purchase ads -->
>   <!--<uses-permission android:name="com.android.vending.BILLING"/> -->
>   <application>
>     <!-- Denote the referenced Google Play services version -->
>     <meta-data android:name="com.google.android.gms.version"
>         android:value="@integer/google_play_services_version" />
>     <!-- Google Mobile Ads Activity -->
>     <activity android:name="com.google.android.gms.ads.AdActivity"
>         android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
>         android:theme="@android:style/Theme.Translucent" />
>     <!-- InAppPurchase Activity -->
>     <activity android:name="com.google.android.gms.ads.purchase.InAppPurchaseActivity"
>         android:theme="@style/Theme.IAPTheme"/>
>   </application>
> </manifest>
> 
> 
> 
> 
> 

@nxsm

This comment has been minimized.

Copy link

@nxsm nxsm commented Jun 5, 2016

I can see you are missing few lines there but it is probably because of copy paste. Try adding
xml````
before
and`

Anyways, try deleting 2 lines under InAppPurchase. And see if you got any duplicates of the manifest with the same activity definitions.  Try to build after. 
@tomski174

This comment has been minimized.

Copy link
Author

@tomski174 tomski174 commented Jun 5, 2016

got the whole file now

@nxsm

This comment has been minimized.

Copy link

@nxsm nxsm commented Jun 5, 2016

Just updated my comment. I had the similar problem, had to delete everything related to google from unity and import all over again. (With unity closed or it keeps reimporting some files). What version of google sdk are you using ?

@tomski174

This comment has been minimized.

Copy link
Author

@tomski174 tomski174 commented Jun 5, 2016

The SDK version is 23.0.2

@tomski174

This comment has been minimized.

Copy link
Author

@tomski174 tomski174 commented Jun 5, 2016

I've commented the below line and the problem is still there.

    <!-- InAppPurchase Activity 
    <activity android:name="com.google.android.gms.ads.purchase.InAppPurchaseActivity"
     android:theme="@style/Theme.IAPTheme"/> -->

the CommandInvokationFailure error I posted first has the following line in it

AndroidManifest.xml:13: Tag attribute authorities has invalid character '$'.

I tried deleting the '$' from the AndroidManifest however that didn't help and the '$' keep on coming back

@nxsm

This comment has been minimized.

Copy link

@nxsm nxsm commented Jun 5, 2016

Hmm. Is the bundle Id defined in player settings?
I am not sure what causing the problem but I would recommend updating SDK to the latest version and try importing the latest version of admob plugin again.

@tomski174

This comment has been minimized.

Copy link
Author

@tomski174 tomski174 commented Jun 5, 2016

Yes, I have bundle Id defined.
I just updated the SDKs to latest versions SDK Tools 25.1.7 and SDK Build-tools to 23.0.3. Deleted and re-imported the latest version of admob plugin. Unfortunately the issues is still the same.
In any case thank you for taking the time and trying to help me.

@nxsm

This comment has been minimized.

Copy link

@nxsm nxsm commented Jun 5, 2016

No problem.
Good luck.

@tomski174

This comment has been minimized.

Copy link
Author

@tomski174 tomski174 commented Jun 5, 2016

Issue #221 helped me solve the problem. Had to go back to version 20 of SDK Build-tools.
Thanks Sergio!

@amitchai

This comment has been minimized.

Copy link

@amitchai amitchai commented Jun 11, 2016

tomski174, if u are right im personally come and kiss u.

@tomski174

This comment has been minimized.

Copy link
Author

@tomski174 tomski174 commented Jun 11, 2016

amitchai, going back to version 20 of SDK Build-tools certainly worked but that wasn't right solution.
When I downloaded the latest JDK and set my Environment Variables properly that solved everything and it now works with the latest version of SDK Build-tools.
env_vars

@rampara

This comment has been minimized.

Copy link
Contributor

@rampara rampara commented Jun 13, 2016

@tomski174 are you able to reproduce this issue with the latest version of the plugin (v3.0.4) ?

@Godhandsxx

This comment has been minimized.

Copy link

@Godhandsxx Godhandsxx commented Jun 14, 2016

@rampara I've the same issue in 3.0.4,what can i do now?wait for next version of the plugin(v3.0.5)?

@rampara

This comment has been minimized.

Copy link
Contributor

@rampara rampara commented Jun 14, 2016

@Godhandsxx can you post the contents the of Assets/Plugins/Android directory of your Unity project?

@rampara

This comment has been minimized.

Copy link
Contributor

@rampara rampara commented Aug 17, 2016

Closing issue due to non-response. If this issue persists, please re-open.

@rampara rampara closed this Aug 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.