Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by solid_ · Jan 18, 2017 at 09:44 AM · androidandroid buildpluginserror build

CommandInvokationFailure: Failed to re-package resources when added GooglePlayGames plugin

Good day. I use deltaDNA Analytics unity plugin and all works fine. But when i adding GooglePlayGames plugin i keep on getting re-package failure errors. Part of error message below:

 CommandInvokationFailure: Failed to re-package resources.
 C:\Androidsdk\build-tools\25.0.1\aapt.exe package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S "res" -I "C:/Androidsdk\platforms\android-25\android.jar" -F bin/resources.ap_ --extra-packages com.deltadna.android.sdk.notifications:com.google.example.games.mainlibproj:com.google.android.gms.auth.api:com.google.android.gms.auth:com.google.android.gms.base:com.google.android.gms:com.google.android.gms:com.google.android.gms.drive:com.google.android.gms.games:com.google.android.gms.gcm:com.google.android.gms.nearby:com.google.android.gms.tasks:android.support.v4:android.support.v4 -S "D:\D\Unity\Projects\AllPlugin1\Temp\StagingArea\android-libraries\deltadna-sdk-notifications-4.2.3\res" -S "D:\D\Unity\Projects\AllPlugin1\Temp\StagingArea\android-libraries\play-services-auth-10.0.1\res" -S "D:\D\Unity\Projects\AllPlugin1\Temp\StagingArea\android-libraries\play-services-auth-base-10.0.1\res" -S "D:\D\Unity\Projects\AllPlugin1\Temp\StagingArea\android-libraries\play-services-base-10.0.1\res" -S "D:\D\Unity\Projects\AllPlugin1\Temp\StagingArea\android-libraries\play-services-base-7.8.0\res" -S "D:\D\Unity\Projects\AllPlugin1\Temp\StagingArea\android-libraries\play-services-basement-10.0.1\res" -S "D:\D\Unity\Projects\AllPlugin1\Temp\StagingArea\android-libraries\play-services-drive-10.0.1\res" -S "D:\D\Unity\Projects\AllPlugin1\Temp\StagingArea\android-libraries\play-services-games-10.0.1\res" -S "D:\D\Unity\Projects\AllPlugin1\Temp\StagingArea\android-libraries\play-services-gcm-7.8.0\res" -S "D:\D\Unity\Projects\AllPlugin1\Temp\StagingArea\android-libraries\play-services-nearby-10.0.1\res" -S "D:\D\Unity\Projects\AllPlugin1\Temp\StagingArea\android-libraries\play-services-tasks-10.0.1\res" -S "D:\D\Unity\Projects\AllPlugin1\Temp\StagingArea\android-libraries\support-v4-23.1.1\res" -S "D:\D\Unity\Projects\AllPlugin1\Temp\StagingArea\android-libraries\support-v4-24.0.0\res"
 
 stderr[
 D:\D\Unity\Projects\AllPlugin1\Temp\StagingArea\android-libraries\play-services-base-10.0.1\res\values\values.xml:33: error: Attribute "imageAspectRatioAdjust" already defined with incompatible format.
 D:\D\Unity\Projects\AllPlugin1\Temp\StagingArea\android-libraries\play-services-base-7.8.0\res\values\common_attrs.xml:13: Original attribute defined here.
 AndroidManifest.xml:34: error: Error: No resource found that matches the given name (at 'resource' with value '@string/sender_id').
 
 ]
 stdout[
 Configurations:
  (default)
 
 Files:
   AndroidManifest.xml
     Src: () AndroidManifest.xml
 
 Resource Dirs:
 Including resources from package: C:\Androidsdk\platforms\android-25\android.jar

I think this is conflict between "play-services-base-10.0.1" used by GP and "play-services-base-7.8.0" used DeltaDNA SDK but i dont know how to fix this issue. Both plugins work correctly separated from each other

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by liortal · Jan 19, 2017 at 07:19 AM

I'd like to provide some more details for people who run into this issue in the future.

This error message ("Failed to re-package resources") can occur when Unity executes aapt, which is a tool from the Android SDK).

This tool is responsible for packaging all kinds of resources into the final .apk package.

In this specific case, it is failing and the error message shows us why:

stderr[ D:\D\Unity\Projects\AllPlugin1\Temp\StagingArea\android-libraries\play-services-base-10.0.1\res\values\values.xml:33: error: Attribute "imageAspectRatioAdjust" already defined with incompatible format. D:\D\Unity\Projects\AllPlugin1\Temp\StagingArea\android-libraries\play-services-base-7.8.0\res\values\common_attrs.xml:13: Original attribute defined here. AndroidManifest.xml:34: error: Error: No resource found that matches the given name (at 'resource' with value '@string/sender_id'). ]

A resource named 'imageAspectRatioAdjust' was defined, but is defined again with an incompatible format. The error also shows the paths where this resource is found:

D:\D\Unity\Projects\AllPlugin1\Temp\StagingArea\android-libraries\play-services-base-10.0.1 D:\D\Unity\Projects\AllPlugin1\Temp\StagingArea\android-libraries\play-services-base-7.8.0

As you can see, the same google play services library (play-services-base) exists twice in the project, but in 2 different versions.

In this case, the fix was to remove one of them (the older one).

NOTE: If someone faces such an issue, but cannot resolve it himself - I provide a professional service for resolving such Android build issues. Feel free to contact me. alt text


unity-android.png (71.7 kB)
Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by solid_ · Jan 18, 2017 at 10:26 PM

Solve it by deleting play-services-base-7.8.0.aar

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

111 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How do I remove appcompat-v7-23.1.1.aar? 1 Answer

java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/content/ContextCompat; - Unity Android Build Error 1 Answer

Cannot Convert Classes to dex format 2 Answers

Building android application 1 Answer

why unity not resolving aar and jar files 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges