Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio 3.0.1 Error: Gradle project sync failed. Basic functionality (e.g. editing, debugging) will not work properly

Tags:

I've installed Android studio 3.0.1 then tried to build very first app by choosing an empty activity, but I've got this message:

Gradle project sync failed. Basic functionality (e.g. editing, debugging) will not work properly

and the error message like this:

Unable to resolve dependency for ':app@releaseUnitTest/compileClasspath': Could not resolve com.android.support:appcompat-v7:26.1.0. Could not resolve com.android.support:appcompat-v7:26.1.0. Required by: project :app Could not resolve com.android.support:appcompat-v7:26.1.0. > Could not parse POM https://dl.google.com/dl/android/maven2/com/android/support/appcompat-v7/26.1.0/appcompat-v7-26.1.0.pom > Already seen doctype.

enter image description here

enter image description here

The first part of log message is like this:

2018-01-03 11:11:12,671 [d thread 8] WARN - ect.sync.idea.ProjectSetUpTask - Already seen doctype. Consult IDE log for more details (Help | Show Log) 2018-01-03 11:11:12,671 [d thread 8] INFO - e.project.sync.GradleSyncState - Gradle sync failed: Already seen doctype.

I've tried some suggested solutions like changing gradle version, update Kotlin plugin(!) and so, but they didn't work.

Any solution?

like image 620
pooria haddad Avatar asked Jan 04 '18 14:01

pooria haddad


People also ask

Why is my gradle Project Sync failed?

Bad internet connection: Since Gradle downloads all the missing versions which are required to run your project, it might fail if you don't have a valid internet connection. Issues in Gradle compiler: There might be cases where your Gradle compiler is not working properly.

How do I sync gradle with Android Studio?

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.


1 Answers

This problem occurs when the Build Tools Version is not set for the project. You just set the build tools version by following this process...

By opening your project structure [File->Project Structure] and selecting the Build Tools Version from app's property tab in Modules section.

This will add build tools version to your gradle file (Module:app) and re-sync the project.

like image 142
Mridul Das Avatar answered Sep 28 '22 17:09

Mridul Das