I have been trying to connect Android studio 4.1 with Firebase but it is not getting linked. I followed the instruction given on the firebase website like copying the dependencies, plugins, etc. into the app Gradle build and Project Gradle Build. My Gradle version is 6.5 and Gradle plugin is 4.1. The Error shown is:
org.codehaus.groovy.ast.expr.TupleExpression cannot be cast to org.codehaus.groovy.ast.expr.ArgumentListExpression
org.codehaus.groovy.ast.expr.TupleExpression cannot be cast to org.codehaus.groovy.ast.expr.ArgumentListExpression Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.) Re-download dependencies and sync project (requires network)
The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
Stop Gradle build processes (requires restart)
Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project. In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.
You will receive this error if you have open different accounts between Android Studio and Firebase. Because the Firebase assistant attempts to contact the Firebase service with your account registered in Android Studio. You can resolve this error by selecting the Add account option in Android Studio.
Please refresh the page and try linking your app again. If you still have issues: Confirm that you're using the same email address for both AdMob and Firebase. Confirm that the project you're linking to hasn't been deleted.
You can explore and integrate Firebase services in your app directly from Android Studio using the Assistant window shown in figure 1.
I believe i found the problem. If you use
apply plugin: 'com.google.gms.google-services'
to your build.gradle
(module) like its instructed you get this error.
Instead change apply plugin
to id
id 'com.google.gms.google-services'
I haven't finish the app but when I sync, it's successful
Using the Firebase guide to link my app with Firebase, the problem is that you have to scatter the plugins by these 2 ways of implementation:
//First way to implement plugins
plugins {
id 'com.android.application'
id 'kotlin-android'
}
//Second way to implement plugins
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
Taking out the apply plugin
ones from the {} of plugins solved my link issues ;)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With