Error:Execution failed for task ':app:preDexDebug'. com.android.ide.common.process.ProcessException:

After adding a jar file to a project's lib folder and after adding it to the build.gradle file as compile'path example' when you sync the gradle it add an additional line as compile files('libs/example.jar'). You just need to remove the line you previously added to the build.gradle file i.e. the compile'path example' after the gradle sync. You also need to remove the line compile fileTree(dir: 'libs', include: '*.jar')

dependencies {
   // compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support:appcompat-v7:22.2.1'
    compile 'org.simple:androideventbus:1.0.5'
    //compile files('libs/androideventbus-1.0.5.jar')
}

可以尝试注释掉compile fileTree(include: ['*.jar'], dir: 'libs')

注意保证主工程跟其他资源里引用的Jar不重复 否则容易冲突。

你可能感兴趣的:(Error:Execution failed for task ':app:preDexDebug'. com.android.ide.common.process.ProcessException:)