Issue
I'm following this tutorial and the Teapot example by google.
This is my gradle:
apply plugin: 'com.android.model.application'
model {
android {
compileSdkVersion = 23
buildToolsVersion = "23.0.2"
defaultConfig.with {
applicationId = "..."
minSdkVersion.apiLevel = 22
targetSdkVersion.apiLevel = 23
versionCode = 1
versionName = "1.0"
}
}
android.buildTypes {
release {
minifyEnabled = false
proguardFiles.add(file('proguard-android.txt'))
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.2.1'
compile 'com.android.support:design:23.2.1'
}
And I get the following error while trying to sync:
Error:Unable to find method
'com.android.build.gradle.internal.ApplicationTaskManager.<init>
(Lorg/gradle/api/Project;Lcom/android/builder/core/AndroidBuilder;
Landroid/databinding/tool/DataBindingBuilder;
Lcom/android/build/gradle/AndroidConfig;Lcom/android/build/gradle/internal/
SdkHandler;Lcom/android/build/gradle/internal/DependencyManager;Lorg/gradle/tooling/
provider/model/ToolingModelBuilderRegistry;)V'.
I tried playing with the dependecies including removing them completely, restarting Android studio but I'm lost as it seems to be ok.
My versions:
distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
classpath 'com.android.tools.build:gradle:2.1.0-alpha5'
classpath 'com.android.tools.build:gradle-experimental:0.6.0-rc3'
Solution
I've solved it, it happened because I had 2 classpaths.
Once I removed the classpath 'com.android.tools.build:gradle:2.1.0-alpha5'
It worked.
Answered By - eric.itzhak
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.