I know there are a couple of threads on this but none seem to solve my problem. I just installed Android Studio v0.4.6 on my Mac. Every time I create a new project I get the error:
Gradle 'Budget' project refresh failed:
Content is not allowed in prolog.
In more detail I get:
Error:A problem occurred configuring root project 'Budget'.
> Could not resolve all dependencies for configuration ':classpath'.
> Could not resolve org.ow2.asm:asm-analysis:4.0.
Required by:
:Budget:unspecified > com.android.tools.build:gradle:0.7.3 > com.android.tools.lint:lint:22.4.2 > com.android.tools.lint:lint-checks:22.4.2
> Could not parse POM http://repo1.maven.org/maven2/org/ow2/asm/asm-analysis/4.0/asm-analysis-4.0.pom
> Content is not allowed in prolog.
> Could not resolve org.ow2.asm:asm-tree:4.0.
Required by:
:Budget:unspecified > com.android.tools.build:gradle:0.7.3 > com.android.tools.lint:lint:22.4.2 > com.android.tools.lint:lint-checks:22.4.2 > com.android.tools.lint:lint-api:22.4.2
> Could not parse POM http://repo1.maven.org/maven2/org/ow2/asm/asm-tree/4.0/asm-tree-4.0.pom
> Content is not allowed in prolog.
I can't seem to find a solution to this issue. I tried updating Android Studio to v0.5, changing the dependencies:
dependencies {
classpath 'com.android.tools.build:gradle:0.5.+'
}
and both of those failed. Any help would really be appreciated!
First of all, you should have installed the newest version of Android Studio which is 0.5.5.
Then update your gradle plugin version to the newest one --> 0.9.+
dependencies {
classpath 'com.android.tools.build:gradle:0.9.+'
}
You should check you repositories if all modules/libraries have a correct URL, eg.
repositories {
mavenCentral()
}
Verify your local.properties and check if a path to Android SDK is correct.
Try to build your project in the Terminal using your local Gradle distribution and Gradle wrapper: Local distribution:
gradle clean build
Wrapper:
./gradlew clean build
If you don't have the local distribution, install the newest version using e.g homebrew (for mac users) (brew install gradle).
Set the path to the local Gradle distribution in the Android Studio (default path for brew and mac is: /usr/local/Cellar/gradle/1.11/libexec/).
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