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.
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.
Solution is
Connect your computer to the internet
Click
Sync project with Gradle files
On toolbar
It will automatically sync the gradle.
Just ignore the error and try running the project anyway. It will fail, but this time you will get a link in the error description. Clicking the link will trigger the automatic update/download of the outdated/missing component.
In my scenario, the project failed to launch two times, each time another API/SDK component being the culprit.
In my case I was just trying to launch a sample project I downloaded, having no clue what API level was being targeted or where to look for this information.
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