Closed zaferyy closed 6 years ago
Same.
Same here
I have the same problem. I need a Gradle build, but I can not find a way to solve the problem.
The line from above has to be MOVED into the main AndroidManifest.xml (into the Assets/Plugins/AndroidManifest.xml).
That doesn't solve the problem
Same problem here
Remove the line from GooglePlayGames/Plugins/Android/GooglePlayGamesManifest.plugin/AndroidManifest.xml
and add the following line to Assets/Plugins/AndroidManifest.xml
.
<meta-data android:name="google_play_services_version" android:value="GPG_VERSION" />
You have to replace GPG_VERSION
with the version you are using. You can find the version in res/values/values.xml
when you unpack the play-services-basement-x.y.z.aar
.
Hi arodus. Your suggestion doesn't work for me because I have a conflict with another plugin DevToDev.
Attribute meta-data#com.google.android.gms.version@value value=(11720000) from AndroidManifest.xml:22:62-86 is also present at [:devtodev:] AndroidManifest.xml:64:13-66 value=(@integer/google_play_services_version). Suggestion: add 'tools:replace="android:value"' to
element at AndroidManifest.xml:22:5-89 to override.
I have added 'tools:replace="android:value"' to my manifest and new an error fired after launch a game.
InvalidOperationException: There was an error creating a GameServices object. Check for log errors from GamesNativeSDK at GooglePlayGames.Native.PInvoke.GameServicesBuilder.Build
same here. need a Gradle build
@sshumihin what does the log say?
C:\Users\PIMMSong\Source\Repos\RollPlayingGame\Temp\gradleOut\GooglePlayGamesManifest.plugin\build\intermediates\bundles\release\aapt\AndroidManifest.xml:35:28-65: AAPT: No resource found that matches the given name (at 'value' with value '@integer/google_play_services_version')
The problem has gone. I don't know why.
then the build succeeded but another error occurred like below : GamesNativeSDK` : Can't register class ...
@arodus
GRADLE ERROR : colliding-attributes
UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:Log(Object)
UnityEditor.Android.GradleInvokationException:ParseAndShowException()
UnityEditor.Android.PostProcessor.PostProcessRunner:RunAllTasks(PostProcessorContext)
UnityEditor.Android.PostProcessAndroidPlayer:PostProcess(BuildTarget, String, String, String, String, String, String, BuildOptions, RuntimeClassRegistry, BuildReport)
UnityEditor.Android.AndroidBuildPostprocessor:PostProcess(BuildPostProcessArgs)
UnityEditor.PostprocessBuildPlayer:Postprocess(BuildTargetGroup, BuildTarget, String, String, String, Int32, Int32, BuildOptions, RuntimeClassRegistry, BuildReport) (at C:\buildslave\unity\build\Editor\Mono\BuildPipeline\PostprocessBuildPlayer.cs:271)
UnityEditor.BuildPipeline:BuildPlayerInternalNoCheck(String[], String, String, BuildTargetGroup, BuildTarget, BuildOptions, Boolean)
UnityEditor.BuildPipeline:BuildPlayerInternal(String[], String, String, BuildTargetGroup, BuildTarget, BuildOptions) (at C:\buildslave\unity\build\artifacts\generated\common\editor\BuildPipelineBindings.gen.cs:335)
UnityEditor.BuildPipeline:BuildPlayer(String[], String, String, BuildTargetGroup, BuildTarget, BuildOptions) (at C:\buildslave\unity\build\artifacts\generated\common\editor\BuildPipelineBindings.gen.cs:232)
UnityEditor.BuildPipeline:BuildPlayer(BuildPlayerOptions) (at C:\buildslave\unity\build\artifacts\generated\common\editor\BuildPipelineBindings.gen.cs:210)
BuildManager:BuildAndroid(AndroidBuildSystem, AppStore, Boolean, BuildOptions, AndroidTargetDevice, Boolean) (at Assets\Infoshell\Scripts\Editor\BuildManager.cs:127)
MainMenu:BuildAndroidGradleDebug() (at Assets\Infoshell\Scripts\Editor\MainMenu.cs:190)
(Filename: Assets/Infoshell/Scripts/Editor/BuildManager.cs Line: 127)
CommandInvokationFailure: Gradle build failed.
C:/Program Files/Java/jdk1.8.0_111\bin\java.exe -classpath "C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-2.14.jar" org.gradle.launcher.GradleMain "assembleDebug"
stderr[
F:\Work\MyProject\Temp\gradleOut\src\main\AndroidManifest.xml:24:62-86 Error:
Attribute meta-data#com.google.android.gms.version@value value=(11720000) from AndroidManifest.xml:24:62-86
is also present at [:devtodev:] AndroidManifest.xml:64:13-66 value=(@integer/google_play_services_version).
Suggestion: add 'tools:replace="android:value"' to <meta-data> element at AndroidManifest.xml:24:5-89 to override.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':processDebugManifest'.
> Manifest merger failed : Attribute meta-data#com.google.android.gms.version@value value=(11720000) from AndroidManifest.xml:24:62-86
is also present at [:devtodev:] AndroidManifest.xml:64:13-66 value=(@integer/google_play_services_version).
Suggestion: add 'tools:replace="android:value"' to <meta-data> element at AndroidManifest.xml:24:5-89 to override.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
]
stdout[
Incremental java compilation is an incubating feature.
:preBuild UP-TO-DATE
@sshumihin I was referring to the log from the GamesNativeSDK. Since it seems that you already fixed the bug with the colliding attributes. It seems that the analytics plugin you are using does not support google play resolver and already contains all the libraries in it's own unity package. I guess there is some version mismatch between the libraries imported from the plugin and the libs from the resolver.
@arodus I think you are right. Thank you.
@arodus I removed DevToDev plugin and there is another an error:
stderr[
D:\MyProject\Temp\gradleOut\src\main\AndroidManifest.xml:23:62-86 Error:
Attribute meta-data#com.google.android.gms.version@value value=(11720000) from AndroidManifest.xml:23:62-86
is also present at [:play-services-basement-11.6.2:] AndroidManifest.xml:20:66-119 value=(@integer/google_play_services_version).
Suggestion: add 'tools:replace="android:value"' to <meta-data> element at AndroidManifest.xml:23:5-89 to override.
Now the problem is Play-Services-Basement.
@sshumihin did you also remove the libraries which were imported by the plugin?
Do you have a project to reproduce the error, or can you send a screenshot of the contents of the Assets/Plugins/Android
folder.
@arodus I reproduced the issue on a clean project with GPGS only. There is a video how to reproduce. There is an Unity project
Sorry, I didn't share the video. Update.
I can build the project without any problem. It could be possible that the reason is the target api level on which you are the building the application. Since the default settings is Automatic (highest installed)
this could also explain why the build works for me.
I currently have the following versions installed:
Ok. Seems I figure it out.
I copy the 2 lines from the GPGS manifest to my manifest as is. Then I can build a project. I don't have to replace "integer/google_play_services_version" by the gp-basement version.
I will check it tomorrow again.
Note, when you do Android setup again the GPGS manifest recreate. You have to remove 2 lines again.
I've solved the GamesNativeSDK problem
by add these 2 line to proguard-user.txt :
-keep class com.google.android.gms.** { *; }
-keep interface com.google.android.gms.** { *; }
I can't use the plugin.
I give up. It's the worst plugin I have ever used.
If I remove the following lines, the apk gets created, but I am not able to authenticate and email and username returns blank -
<meta-data android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
Can someone help me please? Had the same problem that I can't build. Removed the line like in the question in file GooglePlayGames/Plugins/Android/GooglePlayGamesManifest.plugin/AndroidManifest.xml
Now I can build, but I am not able to login. In my Directory Assets/Plugins is no AndroidManifest.
Currently I get very frustrated with this package
Hello everyone, I faced the same issue as you guys and spent almost 2 days searching for solutions and even used the solution arodus suggested, although it did build the apk but didn't let me sign in. So I kind of used every solutions I found on the internet and merged them together don't know exactly what actually made it work but it is working now, you can do the same thing and see if it works. I'm using unity 2017.2.0f3 and API 27.
The manifest attribute has been removed in 0.9.50, so gradle builds will work now without modification.
Sorry but when I try to build with gradle I can't sign in too.
Without gradle: http://prntscr.com/i78v42 With gradle: http://prntscr.com/i78vcr
6 months and no progress on this? I can do gradle build but get operationexception error, cant sign in. Everything works fine with the Internal build.
The line from above has to be MOVED into the main AndroidManifest.xml (into the Assets/Plugins/AndroidManifest.xml).
I seen the same problem, I have solved it with your solution!
Hi! guys i am having the same issue, i am using unity 2018.3.1f1 and i have imported my old project(it has gpgs 0.9.42) from unity 2017 to 2018 i was unable to build APKs but after moving The line
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
from
Assets\GooglePlayGames\Plugins\Android\GooglePlayGamesManifest.plugin\AndroidManifest.xml
to
Assets\Plugins\Android\AndroidManifest.xml
i can build the APK but when i am testing it, it's crashing after opening.
Hello srcsameer, did you already resolve the crash issue? If not, can you post those error logs?
@j-ito-Tribe thanks for your reply, but i have solved it.
Hi! guys i am having the same issue, i am using unity 2018.3.1f1 and i have imported my old project(it has gpgs 0.9.42) from unity 2017 to 2018 i was unable to build APKs but after moving The line
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
from Assets\GooglePlayGames\Plugins\Android\GooglePlayGamesManifest.plugin\AndroidManifest.xml to Assets\Plugins\Android\AndroidManifest.xmli can build the APK but when i am testing it, it's crashing after opening.
If you are using unity for this. You don't have to change anything in android:name = "". Change andoid:value to your admob id. I think this video will solve this issue https://youtu.be/qlRvqi1DAQk
GameAnalytics can trigger that error in AndroidManifest.xml https://gameanalytics.com/docs/item/unity-sdk#android
I disabled Unity's default Android configuration, ran the Playstore resolve, then again enabled default config
@victor871129 how did you resolve this?
Go to preferences, uncheck the NDK, SDK and JDK checkboxes, click 3 Browse buttons. Then check those NDK, SDK and JDK checkboxes again. Restart Unity app. I also removed temporarily that conflicting line on AndroidManifest.xml in gameanalytics.aar zip-like file.
@victor871129 that did the trick, many thanks!
Remove the line from
GooglePlayGames/Plugins/Android/GooglePlayGamesManifest.plugin/AndroidManifest.xml
and add the following line toAssets/Plugins/AndroidManifest.xml
.<meta-data android:name="google_play_services_version" android:value="GPG_VERSION" />
You have to replace
GPG_VERSION
with the version you are using. You can find the version inres/values/values.xml
when you unpack theplay-services-basement-x.y.z.aar
.
Your suggestion solved my issue, 1M thanks :)
Hi,
I have GooglePlayGamesPlugin-0.9.42 and it doesn't work with Gradle build it says:"Resource '@integer/google_play_services_version' not found in AndroidManifest.xml:35"
when I delete the below meta-data line from GooglePlayGames/Plugins/Android/GooglePlayGamesManifest.plugin/AndroidManifest.xml
it is working but can not login to google play games platform. if this line is not needed anymore why don't you delete it. if I don't use Gradle it is working but I need Gradle for adding firebase (with a lot of unnecessary plugins).
thanks.