Response-native - more than one library with package name com.google.android.gms.license '

I know that it is caused due to the update of the new version of gogle to 12.0.0 here is the link https://developers.google.com/android/guides/releases

add to android/build.gradle , but now it cannot be compiled using isignal coz, it also uses the Google service with a different version

another solution on github suggests me add a '+' depending, but it doesn't work

 configurations.all { // #PlayServicesGate — March, 20 2018 resolutionStrategy { force 'com.google.android.gms:play-services-auth:11.8.0' // Firebase dependencies force "com.google.android.gms:play-services-base:11.8.0" force 'com.google.firebase:firebase-core:11.8.0' force 'com.google.firebase:firebase-auth:11.8.0' } } 

please let me know if anyone knows about this

  :react-native-onesignal:prepareComGoogleAndroidGmsPlayServicesTagmanagerV4Impl1200Library :react-native-onesignal:prepareComGoogleAndroidGmsPlayServicesTagmanagerV4ImplLicense1200Library :react-native-onesignal:prepareComGoogleAndroidGmsPlayServicesTasks1200Library :react-native-onesignal:prepareComGoogleAndroidGmsPlayServicesTasksLicense1200Library :react-native-onesignal:prepareComOnesignalOneSignal382Library :react-native-onesignal:prepareOrgWebkitAndroidJscR174650Library :react-native-onesignal:prepareReleaseDependencies :react-native-onesignal:compileReleaseAidl :react-native-onesignal:compileReleaseNdk UP-TO-DATE :react-native-onesignal:compileLint :react-native-onesignal:copyReleaseLint UP-TO-DATE :react-native-onesignal:compileReleaseRenderscript :react-native-onesignal:generateReleaseBuildConfig :react-native-onesignal:generateReleaseResValues :react-native-onesignal:generateReleaseResources :react-native-onesignal:mergeReleaseResources :react-native-onesignal:processReleaseManifest :react-native-onesignal:processReleaseResources FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':react-native-onesignal:processReleaseResources'. > Error: more than one library with package name 'com.google.android.gms.license' * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED Total time: 3 mins 7.465 secs Error: /Users/vsts/agent/2.131.0/work/1/s/android/gradlew failed with return code: 1 at ChildProcess.<anonymous> (/Users/vsts/agent/2.131.0/work/_tasks/Gradle_8d8eebd8-2b94-4c97-85af-839254cc6da4/1.128.0/node_modules/vsts-task-lib/toolrunner.js:569:30) at emitTwo (events.js:106:13) at ChildProcess.emit (events.js:191:7) at maybeClose (internal/child_process.js:886:16) at Socket.<anonymous> (internal/child_process.js:342:11) at emitOne (events.js:96:13) at Socket.emit (events.js:188:7) at Pipe._handle.close [as _onclose] (net.js:497:12) 
+5
source share
4 answers

go to project.properties and change the following lines:

cordova.system.library.2 = com.google.android.gms: game services gsm: + cordova.system.library.3 = com.google.android.gms: games service location: +

For

cordova.system.library.2 = com.google.android.gms: play-services-GCM: 11+ cordova.system.library.3 = com.google.android.gms: games-services location: 11 +

It worked for me :)

0
source

just add this line to your code block

  configurations.all{ //here include these line force 'com.google.android.gms:play-services-gcm:11.8.0' force 'com.google.android.gms:play-services-analytics:11.8.0' force 'com.google.android.gms:play-services-location:11.8.0' } 
0
source

its simple, since I am struggling with my project, I find out that any dependencies that you used in your project all use "+", and now it no longer works, so apply a specific version to it by doing

in: android / build.gradle

 configurations.all { resolutionStrategy { force "com.google.android.gms:play-services-gcm:11.8.0" .... your other dependencies } } 

this worked for me, as I am stuck in the id, but I have all the dependencies formed with the id, and give it a specific version, and now everything works fine

0
source

I tried some of the solutions posted here without success, and I really did not want to delve into node_modules , but this is what I did, as my project is time sensitive. At least until a permanent solution is found.

At my build.gradle application build.gradle I updated all Google dependencies to version 11.8.0, for example. compile "com.google.android.gms:play-services-base:11.8.0" . Then in react-native-onesignal build.gradle :

I changed these lines:

 compile 'com.google.android.gms:play-services-gcm:+' compile 'com.google.android.gms:play-services-analytics:+' compile 'com.google.android.gms:play-services-location:+' 

to the same specific version:

 compile 'com.google.android.gms:play-services-gcm:11.8.0' compile 'com.google.android.gms:play-services-analytics:11.8.0' compile 'com.google.android.gms:play-services-location:11.8.0' 

The bug seems to be fixed. If someone has a better solution, I will gladly implement this in the project. In the meantime, I hope this helps someone else too.

0
source

Source: https://habr.com/ru/post/1275997/


All Articles