Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to find method 'com.android.build.api.variant.SourceDirectories$Flat com.android.build.api.variant.Sources.getByName(java.lang.String)'

I'm encountering an issue while working on my Android project. I'm receiving the following error message:

Unable to find method 'com.android.build.api.variant.SourceDirectories$Flat 'com.android.build.api.variant.Sources.getByName(java.lang.String)''com.android.build.api.variant.SourceDirectories$Flat com.android.build.api.variant.Sources.getByName(java.lang.String)'

Im trying use a Firebase for my Android Studio Project. it gave me this error, when i add this code in my build.gradle (module)

id 'com.google.gms.google-services'

I tought my application is bugged or something, so i tried making new project and try to link the firebase too. but its still error

like image 930
galuh bagas Avatar asked Oct 30 '25 09:10

galuh bagas


1 Answers

It is because you are using an incompatible version of the plugin. I am using the 4.3.15 and works fine, with the most recent I had the same problem.

like image 194
trikimg Avatar answered Oct 31 '25 23:10

trikimg