Search code examples
javaandroidlinphoneandroid-multidex

Android linphone.jar Error:Execution failed for task ':app:dexDebug'


After adding linphone android sdk I encountered this problem:

Error:Execution failed for task ':app:dexDebug'. com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_25\bin\java.exe'' finished with non-zero exit value 2`

I know that problem is in android support-v4 because linphone uses this. But I have no idea how to exclude it from *.jar file. Here are my dependencies:

dependencies {
    compile fileTree(dir: 'lib', include: ['*.jar'])
    compile ('com.android.support:appcompat-v7:22.1.1')
}

linphone.jar located in lib folder.

I read this answer: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat

But it didn't help me.

Any ideas how I can fix this?


Solution

  • delete compile fileTree(dir: 'lib', include: ['*.jar'])