Gradle sync failed: Sync failed: reason unknown
Tried solutions
using Android studio 4.2.1 and gradle 6.5
Open your gradle. properties file in Android Studio. Restart Android Studio for your changes to take effect. Click Sync Project with Gradle Files to sync your project.
In your screenshot, there is a infomation bar on top of the editor area "Gradle project sync failed. Basic funtionality will not work." Click the "Show log in finder", you can check the real reason in the log file.
In my case, I found “ Module: 'xxxxx' platform 'android-26' not found” which mean the platform 26 is missing. After download the platform api level 26, problem solved.
There is great post here: https://www.tehrir.com/gradle-sync-failed in this matter.
Make sure your Android Gradle Plugin version matches Gradle version according to this page: https://developer.android.com/studio/releases/gradle-plugin#updating-gradle
If it matches and still gives same error try upgrading to a higher "tier":
4.2.1 and 6.7.1
It worked for me.
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