I know that this question of mine has been asked many times and I did follow most of the answers but none of those helped me. So this is my problem, whenever I sync my proje
For me it worked to delete the Gradle cache on user directory level:
/Users/<username>/.gradle/cache
. The --info
option showed an inconsistency there.
I had a similar problem when importing firebase into my project. First of all make sure that you followed the tutorial steps correctly and have imported the provided .json file into the right directory.
Also, since firebase v9.0 it has been implemented into the google play services, so for firebase to work properly, make sure that the Google play services are up to date on the device that you're testing,
I've also found this answer to be helpful while solving my issue https://stackoverflow.com/a/37310513/6728099
This Problem created when the suddenly System restarted, then gradle file corrupted. and that corrupted file cached, so we need to Delete this file from your project
your_project_path/.gradle/2.14.1/taskArtifacts
It will be re-generate again.
Then restart the Android studio and re-compile the project.
source : https://code.google.com/p/android/issues/detail?id=220741#c13
It is worked for me.
Check your app/build.gradle
.
My problem was a '
in a dependency.
I have same problem when the java version is 1.9
jenv use java 1.8
all problem is solved.
Remove below lines from dependency's, because already you compile complete play services dependency
compile 'com.google.android.gms:play-services-location:9.4.0'
compile 'com.google.android.gms:play-services-appindexing:9.4.0'