question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Android build fails

See original GitHub issue

Like this issue there is a problem in the gradle file? https://github.com/fechanique/cordova-plugin-fcm/issues/319

Android build failed with this error message.

* What went wrong:
A problem occurred configuring root project 'android'.
> Cannot add task ':processDebugGoogleServices' as a task with that name already exists.

It works when I changed a version 3.1.0 to 3.0.0.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
NBAMjcommented, Jul 10, 2017

I was having the same issue. What I did is I changed a line in project.properties that corresponds to play-services-ads sdk version to use 11.0.+ explicitly cordova.system.library.1=com.google.android.gms:play-services-ads:11.0.+

Hope it helps.

1reaction
PratikPagadacommented, Oct 17, 2017

open plugins directory -> build.gradle

Comment out these lines in the cordova-support-google-services directory build.gradle file.

dependencies { classpath ‘com.android.tools.build:gradle:2.2.1’
// classpath ‘com.google.gms:google-services:3.1.0’ }

// ext.postBuildExtras = { // apply plugin: com.google.gms.googleservices.GoogleServicesPlugin // }

then Remove and re-add plattform.

then (build.gradle file of the android platform folder) Add this line to the classpath section

classpath 'com.google.gms:google-services:3.1.0'
And add this line below the dependencies, nearly at the bottom of the file
apply plugin: 'com.google.gms.google-services'
Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed to build project with Android studio - Stack Overflow
6 Answers 6 · File->Other Settings->Default Project Structure · Under Project Settings: Project, set Project SDK as Android SDK. · Click Edit button...
Read more >
[FIXED] Android build failures `No matching variant of ... - GitHub
Description. Hey all, I'd like to share an update on a series of build failures React Native & Expo users have been experiencing...
Read more >
Known issues with Android Studio and Android Gradle Plugin
Known issues with Android Studio and Android Gradle Plugin · Error when rendering Compose Preview · Error when using different passwords for key...
Read more >
Why does a build fail in Android Studio even if I don't have any ...
Build fails are normal in Android studio. I have faced a million times. It may occure if your Android Studio is not updated....
Read more >
Different Ways to fix "Error running android: Gradle project ...
Different Ways to fix “Error running android: Gradle project sync failed” in Android Studio ; Method 1: Restarting your project using Invalidate ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found