I get this error when I build my project:
error: duplicate class: class_name$$ViewInjector
This is my build.gradle file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 19
buildToolsVersion "19.1.0"
defaultConfig {
applicationId "com.stel.order"
minSdkVersion 9
targetSdkVersion 19
}
buildTypes {
release {
runProguard true
proguardFiles 'proguard-project.txt'
}
}
}
dependencies {
compile 'com.google.code.gson:gson:2.2.4'
compile 'com.jakewharton:butterknife:6.0.0'
...
}
If I clean the project, it builds without errors, but when I run the project, I get this error.
It happened with me too when I migrated from Eclipse. All you need is to delete files
path.OuterClass$$ViewInjector
in your project manually.