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

Can't build Unity project after adding google play games! #895

Closed
DroidifyDevs opened this Issue Jan 3, 2016 · 12 comments

Comments

Projects
None yet
7 participants
@DroidifyDevs
Copy link

DroidifyDevs commented Jan 3, 2016

So after adding google play games I can't build my unity project. During the build, it will stop and say "Can't repackage resources. See console for details". I've spent over 4 hours on this and it is quite frustrating! :(

In console, it says this: CommandInvokationFailure: Failed to re-package resources. See the Console for details.
C:\Program Files (x86)\Android\android-sdk\build-tools\23.0.1\aapt.exe package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S "res" -I "C:/Program Files (x86)/Android/android-sdk\platforms\android-23\android.jar" -F bin/resources.ap_ --extra-packages android.support.v7.appcompat: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\Me2\Music\ROCKET TEST\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res" -S "C:\Users\Me2\Music\ROCKET TEST\Temp\StagingArea\android-libraries\play-services-base-8.4.0\res" -S "C:\Users\Me2\Music\ROCKET TEST\Temp\StagingArea\android-libraries\play-services-basement-8.4.0\res" -S "C:\Users\Me2\Music\ROCKET TEST\Temp\StagingArea\android-libraries\play-services-drive-8.4.0\res" -S "C:\Users\Me2\Music\ROCKET TEST\Temp\StagingArea\android-libraries\play-services-games-8.4.0\res" -S "C:\Users\Me2\Music\ROCKET TEST\Temp\StagingArea\android-libraries\play-services-nearby-8.4.0\res" -S "C:\Users\Me2\Music\ROCKET TEST\Temp\StagingArea\android-libraries\play-services-plus-8.4.0\res" -S "C:\Users\Me2\Music\ROCKET TEST\Temp\StagingArea\android-libraries\support-v4-23.1.1\res"

stderr[
AndroidManifest.xml:17: error: Error: No resource found that matches the given name (at 'theme' with value '@style/Theme.IAPTheme').

]
stdout[
Configurations:
(default)

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

Resource Dirs:
Including resources from package: C:\Program Files (x86)\Android\android-sdk\platforms\android-23\android.jar
applyFileOverlay for drawable

There are more errors, if you want I can upload them too.

Can anyone PLEASE help to get this working? THANK YOU

@claywilkinson

This comment has been minimized.

Copy link
Contributor

claywilkinson commented Jan 5, 2016

Which version of Unity? It looks like the AndroidManifest.xml has a theme referenced which is not defined. Can you look in the AndroidManifest.xml and see which activity it is?

@Melesar

This comment has been minimized.

Copy link

Melesar commented Jan 6, 2016

A have almost the same issue on the Unity v5.3.0f4

stderr[
D:\BeraRun\Unity Projects\matchthreegame\Temp\StagingArea\android-libraries\appcompat-v7-23.1.0\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'.

D:\BeraRun\Unity Projects\matchthreegame\Temp\StagingArea\android-libraries\appcompat-v7-23.1.0\res\values-v23\values-v23.xml:24: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.

]

Would be grateful for your help

@Delanir

This comment has been minimized.

Copy link

Delanir commented Jan 7, 2016

Hello,
I'm experiencing exactly the same the same issue as @Melesar .
My unity version is 5.3.1p1 .

@DroidifyDevs

This comment has been minimized.

Copy link
Author

DroidifyDevs commented Jan 7, 2016

I'm using unity 5.2.3f1

thanks for the help!!

@OwlGames

This comment has been minimized.

Copy link

OwlGames commented Jan 8, 2016

im having the same problem here. Im trying others versions.
Version 0.9.21 works.
Im trying to use the new version too.

editing post 11/01/2016
@claywilkinson solved this for me.
The solution is use android SDK API 23

image

@claywilkinson

This comment has been minimized.

Copy link
Contributor

claywilkinson commented Jan 11, 2016

The style android:Widget.Material.Button.Colored is defined in the android-23 SDK. Can you download that version in the SDK manager and re-run the plugin setup?

@TofuStudios

This comment has been minimized.

Copy link

TofuStudios commented Jan 19, 2016

For me i had a similar problem with the google play services and adMob. So looking in your Unity Project under Assets->Plugin->Android all i could see was the "GoogleMobileAdsPlugin". Therefore i manually found the "google-play-services_lib" folder and DRAGGED and DROOPED that folder into my Unity Project Assets-->Plugin-->Android where the "GoogleMobileAdsPlugin" was located.
image 1

For me the folder was located:
C:\Program Files (x86)\Android\android-sdk\extras\google\google_play_services\libproject
If you don't have that folder, download it from SDK manager at the bottom and install *(Google Play Services)
image 2
image 3

Then in the "GoogleMobileAdsPlugin" you make a folder "res" and click into it. Then in that "res" folder you make another folder called "values".
image 4
image 5

Once that is done, go back into the "google-play-services_lib" folder on your hard disk, there should also be a folder named "res" which you click into it and a folder called "values". Now in the "values" folder you copy the "version.xml" file which is highlighted in the image below.
image 7

Copy that file into your created "values" folder in the GoogleMobileAdsPlugin
image 6

That then got rid of the errors i see from your one. Try that out and see if it works? Let me know how it goes?

@TofuStudios

This comment has been minimized.

Copy link

TofuStudios commented Jan 19, 2016

Also nearly forgot. I also deleted the In app purchase activity in the AndroidManifest of the "GoogleMobileAdsPlugin" folder since Im not using.
image 8

@claywilkinson

This comment has been minimized.

Copy link
Contributor

claywilkinson commented Jan 27, 2016

OK to close this one?

@OwlGames

This comment has been minimized.

Copy link

OwlGames commented Jan 27, 2016

Yes off course. Sorry its solved.

@claywilkinson

This comment has been minimized.

Copy link
Contributor

claywilkinson commented Jan 27, 2016

Great! thanks.

@misaghDroid

This comment has been minimized.

Copy link

misaghDroid commented Aug 27, 2017

I'm using unity 5.3.5 and my android sdk has been updated to latest version.
I cant find the path you mentioned for google_play_service_lib in sdk folder. My problem have not solved yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.