I am new to Android Studio and I have just created a new project with only one Activity with fragments(Android studio created that), and when I ran the MyActivity.java , error occurs:
Error running MyActivity: Gradle project sync failed. Please fix your project and try again.
Nothing more in my event log.
I have no idea why it is, and This link did not helps.
One clue is that Gradle project sync in progress is flowing all the time , just after I restart the Studio.
For this, you have to connect your PC to the internet and you have to open your Android studio. After opening your project click on the Sync Project with Gradle files option. This will automatically download the new Gradle files and will fix the issue which is caused by the Gradle files.
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