Gradle ProjectName Project Update Error - Error: already seen Doctype

I'll go crazy! I already searched and tried everything (google and stackoverflow), but nothing helps.

I am trying to open (also tried to import) a slidenerd project on Github ( http://github.com/slidenerd/materialtest ) in Android Studio 1.2.1.1 with Gradle 2.2, but I got this annoying error!

Gradle Failed to update ProjectName project

Error: already seen Doctype

Can you help me understand what I can do to solve it?

This is my Gradle console log:

Accomplishment of tasks: [:]

On-demand configuration is an incubation function. Download https://jcenter.bintray.com/com/android/tools/lint/lint/24.0.1/lint-24.0.1.pom

[Fatal Error] lint-24.0.1.pom: 3: 10: Doctype giĆ  presente (means that you have already seen).

FAILURE: build failed with exception.

  • What went wrong: There was a problem setting up the root project "MehdiApp".

    Failed to resolve all dependencies for configuration: classpath. Failed to resolve com.android.tools.lint: lint: 24.0.1. Requires:: MehdiApp: unspecified> com.android.tools.build: gradle: 1.0.1 Failed to parse POM https://jcenter.bintray.com/com/android/tools/lint/lint/24.0.1/lint- 24.0.1.pom Doctype giĆ  presente.

  • Try: Run with the --stacktrace option to get a stack trace. Run with the -info or --debug option to get more log output.

STRICTLY MALFUNCTIONAL

Total time: 5,331 seconds

+6
source share
3 answers

This happened to me when I had two google and gradle:3.0.0 repositories as dependencies in the build.gradle file:

 allprojects { repositories { google() jcenter() maven { url "https://maven.google.com" } } } dependencies { classpath 'com.android.tools.build:gradle:3.0.0' } 

It was an obvious mistake. So I removed the maven part and changed com.android.tools.build:gradle:3.0.0 to com.android.tools.build:gradle:3.0.1 .

This solved my problem.

+4
source

network may be the cause. I changed my vpn network and then gradle was successful.

+2
source

Make sure that the build.gradle (project) file uses only jcenter () as the repository resource, not maven or mavenCentral.

0
source

Source: https://habr.com/ru/post/988143/


All Articles