Recently I have added Google Play Games Plugin v 0.9.30 and this I have recently downloaded from github.
My unity version is 4.6.9p1 and SDK installed upto v23.
In unity, I am getting following error when I try to generate build.
Error building Player: CommandInvokationFailure: Failed to re-package resources. See the Console for details.
C:Sdkbuild-tools23.0.2aapt.exe package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S "res" -I "C:/Sdk/platforms/android-23android.jar" -F bin/resources.ap_ --extra-packages 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 "E:SiddharthProjectsHotWingsTempStagingAreaandroid-librariesgoogle-play-services_libres" -S "E:SiddharthProjectsHotWingsTempStagingAreaandroid-librariesGoogleMobileAdsPluginres" -S "E:SiddharthProjectsHotWingsTempStagingAreaandroid-librariesplay-services-base-8.4.0res" -S "E:SiddharthProjectsHotWingsTempStagingAreaandroid-librariesplay-services-basement-8.4.0res" -S "E:SiddharthProjectsHotWingsTempStagingAreaandroid-librariesplay-services-drive-8.4.0res" -S "E:SiddharthProjectsHotWingsTempStagingAreaandroid-librariesplay-services-games-8.4.0res" -S "E:SiddharthProjectsHotWingsTempStagingAreaandroid-librariesplay-services-nearby-8.4.0res" -S "E:SiddharthProjectsHotWingsTempStagingAreaandroid-librariesplay-services-plus-8.4.0res" -S "E:SiddharthProjectsHotWingsTempStagingAreaandroid-librariessupport-v4-23.1.1res"
stderr[
E:SiddharthProjectsHotWingsTempStagingAreaandroid-librariesgoogle-play-services_libresvaluesbase_attrs.xml:11: error: Attribute "buttonSize" has already been defined
E:SiddharthProjectsHotWingsTempStagingAreaandroid-librariesgoogle-play-services_libresvaluesbase_attrs.xml:16: error: Attribute "colorScheme" has already been defined
E:SiddharthProjectsHotWingsTempStagingAreaandroid-librariesgoogle-play-services_libresvaluesbase_attrs.xml:21: error: Attribute "scopeUris" has already been defined
E:SiddharthProjectsHotWingsTempStagingAreaandroid-librariesgoogle-play-services_libresvaluescommon_attrs.xml:13: error: Attribute "imageAspectRatioAdjust" has already been defined
E:SiddharthProjectsHotWingsTempStagingAreaandroid-librariesgoogle-play-services_libresvaluescommon_attrs.xml:22: error: Attribute "imageAspectRatio" has already been defined
E:SiddharthProjectsHotWingsTempStagingAreaandroid-librariesgoogle-play-services_libresvaluescommon_attrs.xml:27: error: Attribute "circleCrop" has already been defined
]
stdout[
I have just pasted major part over but list is not completed. Please guide me to come out of this.
I have already gone through this link
https://github.com/playgameservices/play-games-plugin-for-unity/issues/895#issuecomment-172799808
The above error into more readable format:
https://www.dropbox.com/s/k36w0ym83b0k6x4/GPGError.png?dl=0&preview=GPGError.png
Hi @siddharth3322 ,
Mine was fixed after updating these 2 to its latest version.
You should not have google-play-services_lib in your project any longer. This library overlaps with the .aar files.
My android library was already updated with latest Android Support Repository and Google Repository.
I have also tried last opinion of removing google-play-services_lib directory from project but this also can't able to solve my problem.
yes by removing, google-play-services_lib folder from project now I have no error as well my google play games working correctly.
But now I am facing other issue related to admob ad, now admob ad is not working because removal of above folder.
I am getting this message on screen:
02-03 20:52:17.055 7152-7167/? I/Unity: AndroidJavaException: java.lang.ClassNotFoundException: com.google.android.gms.ads.AdSize
at UnityEngine.AndroidJNISafe.CheckException () [0x00000] in
at UnityEngine.AndroidJNISafe.CallStaticObjectMethod (IntPtr clazz, IntPtr methodID, UnityEngine.jvalue[] args) [0x00000] in
at UnityEngine.AndroidJavaObject._CallStaticAndroidJavaObject [0x00000] in
at UnityEngine.AndroidJavaObject.CallStaticAndroidJavaObject [0x00000] in
at UnityEngine.AndroidJavaObject.FindClass (System.String name) [0x00000] in
at UnityEngine.AndroidJavaObject._AndroidJavaObject (System.String className, System.Object[] args) [0x00000] in
at UnityEngine.AndroidJavaObject..ctor (System.String className, System.Object[] args) [0x00000] in
at GoogleMobileAds.Android.Utils.Get
Good news! Admob updated their plugin to use the same jar resolver: https://github.com/googleads/googleads-mobile-unity
there is no difference in output. I have removed plugin completely and then added new one but getting same above error.
even admob delegates stopped working after adding new admob 3.0
Can you check that it added the play-services-ads-8.xxx.aar to Android Plugins? Did you post an issue on the admob repository?
Yes they have added play-services-ads-8.4.0.aar file.
I have already added post over there.
https://github.com/googleads/googleads-mobile-unity/issues/159
I have deleted all plugins from game- admob and google play service.
downloaded latest version from store and import into project.
but now I have admob banner working correctly but can't able to authenticate google play service for me. even nothing happen in device screen. I have uploaded image of log data I am getting.
Make sure you update the Android Support Repository to the latest version in the Android SDK Manager. It is in the "extras" section. (Also make sure the Google Repository is also updated).
these 2 are already updated by me and latest version exist.
whether I need to copy google-play-game_lib folder or not?
if I don't do this then getting another error.
if you say then I can move ahead from scratch as well by removing all plugins then integrate one by one above 2 as per my requirements.
at present admob ad is working in game but there is no authentication screen for login come on screen.
I created new project in unity, downloaded GoogleMobileAds.package, imported, demo script, changed adUnitIds and InterstitialAd works, but Banner doesn't. I receive log "HandleFailedToReceiveAd event received with message: No fill", or "internal error". What is going on?
EDIT: Problem solved - I commented lines with IOS. Sorry for wrong topic, my mistake.
@Loony04 - Did you post this in the admob repository issues? They are more likely to be able to help.
Most helpful comment
You should not have google-play-services_lib in your project any longer. This library overlaps with the .aar files.