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
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.
network might be the reason.
i changed my vpn network then gradle
build was successful.
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