android studio 0.4.2: Gradle project sync failed error
I'm assuming I can answer my own question....
This worked for me.
- File -> Invalidate caches / Restart
- Shutdown Android Studio
- Rename/remove .gradle folder in the user home directory
- Restart Android Studio let it download all the Gradle stuff it needs
- Gradle build success !
- Rebuild project.... success !
Out of curiousity I compared the structure of the old .gradle and the new one... they were pretty different !
So I'll see how 0.4.2 goes :)
Gradle project sync failed (Android Studio)
Found the solution: just click Tools > Android > Sync Project with Gradle Files (did it in every branch). Everything is fine now. Thanks to this article: http://devdeeds.com/update-gradle-plugin-android-studio/
How to fix sudden and generic Gradle Project Sync Failed error
I solved my own problem in a pretty simple way. I created a new project, opened the app-level build.gradle file, added all the extra dependencies from the old project, then replaced the old file with the newly created one. This solved the issue. Upon inspecting the differences between old and new I realized that somehow
android {
buildToolsVersion '29.x.x'
}
had been added to the old project and it was one version greater than the compileSdkVersion
. After Gradle finally synced successfully it notified me to fix the buildToolsVersion, which is now the same as the compileSdkVersion.
android {
compileSdkVersion 28
buildToolsVersion '28.0.3'
}
Related Topics
What Does Layoutinflater in Android Do
Warning: This Asynctask Class Should Be Static or Leaks Might Occur
How to Add Window Android.View.Viewroot$W@44Da9Bc0 -- Permission Denied for This Window Type
How to Remove Application from Recent Application List
Manifest Merger Failed:Uses-Sdk:Minsdkversion 14
Resources$Notfoundexception: Resource Is Not a Drawable (Color or Path)
How to Attach Javadoc or Sources to Jars in Libs Folder
Material Effect on Button with Background Color
How to Display Toast in Android
How to Make an Alert Dialog Fill 90% of Screen Size
How to Change Color of Button in Android When Clicked
Android Fragment Onclick Button Method
Gradle: Execution Failed for Task ':Processdebugmanifest'
How to Add Stacktrace or Debug Option When Building Android Studio Project
Sending Message Through Whatsapp
Check If Application Is on Its First Run