Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gradle 'ProjectName' project refresh failed - Error: Already seen Doctype

I'm going mad! I've already searched and tried everything (google and stackoverflow) but nothing seems to help.

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

Gradle 'ProjectName' project refresh failed

Error: Already seen Doctype

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

This is my Gradle console log:

Executing tasks: [:]

Configuration on demand is an incubating feature. 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 Already seen).

FAILURE: Build failed with an exception.

  • What went wrong: A problem occurred configuring root project 'MehdiApp'.

    Could not resolve all dependencies for configuration ':classpath'. Could not resolve com.android.tools.lint:lint:24.0.1. Required by: :MehdiApp:unspecified > com.android.tools.build:gradle:1.0.1 Could not 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 --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 5.331 secs

like image 888
Mehdi Mahdloo Avatar asked May 29 '15 10:05

Mehdi Mahdloo


2 Answers

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

allprojects {
    repositories {
        google()
        jcenter()
        maven {
            url "https://maven.google.com"
        }
    }
}

dependencies {
    classpath 'com.android.tools.build:gradle:3.0.0'
}

That was an obvious mistake. So I removed 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.

like image 70
Alex Jolig Avatar answered Sep 21 '22 18:09

Alex Jolig


network might be the reason. i changed my vpn network then gradle build was successful.

like image 29
SemyColon.Me Avatar answered Sep 20 '22 18:09

SemyColon.Me