Jon
Jon

Reputation: 703

Two classpath on gradle Android

I am using gradle experimental on my android proyect.

I was getting this error on the gradle build:

Error: Unable to find method com.android.build.gradle.internal.ApplicationTaskManager

My gradle project is:

buildscript {
repositories {
    jcenter()
}
dependencies {
    classpath 'com.android.tools.build:gradle:1.5.0'
    classpath 'com.android.tools.build:gradle-experimental:0.3.0-alpha7'
}

When I delete the first classpath: classpath 'com.android.tools.build:gradle:1.5.0' the error disappears the gradle built it without any problems.

I need the two classpath for my project.

Cannot I use two classpath?

Does exist another alternative?

Thanks for your help.

Upvotes: 1

Views: 149

Answers (2)

tan bo
tan bo

Reputation: 26

http://tools.android.com/tech-docs/new-build-system/gradle-experimental

Plugin name is com.android.model.application instead of com.android.application. Or use apply plugin: "com.android.model.library" if you want to create an Android aar library.

Maybe this will help.

Upvotes: 1

Heisenberg
Heisenberg

Reputation: 13

Did you try syncing your project by enabling the online sync mode after you added the new dependencies?

Upvotes: 0

Related Questions