Intel® Collaboration Suite for WebRTC
Community support and discussions on the Intel® Collaboration Suite for WebRTC (Intel® CS for WebRTC).
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
For the latest information on Intel’s response to the Log4j/Log4Shell vulnerability, please see Intel-SA-00646
1136 Discussions

android sdk3.1 compile error-Multiple dex files define Lorg/webrtc/VideoCapturerAndroid$CameraErrorHandler

allen_w_
Beginner
133 Views

Android studio1.5   build android P2pSample Error:

Error:Execution failed for task ':src:sample:p2pSample:transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/usr/java/jdk1.8.0_73/bin/java'' finished with non-zero exit value 2

UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define Lorg/webrtc/VideoCapturerAndroid$CameraErrorHandler;
    at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:594)
    at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:552)
    at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:533)
    at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:170)
    at com.android.dx.merge.DexMerger.merge(DexMerger.java:188)
    at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:439)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:287)
    at com.android.dx.command.dexer.Main.run(Main.java:230)
    at com.android.dx.command.dexer.Main.main(Main.java:199)
    at com.android.dx.command.Main.main(Main.java:103)

build.gradle:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 15
    buildToolsVersion "19.1.0"

    defaultConfig {
        applicationId "com.intel.webrtc.p2p.sample"
        minSdkVersion 15
        targetSdkVersion 15
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }

    packagingOptions{
        exclude 'AndroidManifest.xml'
    }
}

dependencies {
    compile('io.socket:socket.io-client:0.7.0') {
        // excluding org.json which is provided by Android
        exclude group: 'org.json', module: 'json'
    }
    compile files('libs/woogeenbase.jar')

    compile files('libs/woogeenp2p.jar')

    compile files('libs/libjingle_peerconnection.jar')}
0 Kudos
3 Replies
allen_w_
Beginner
133 Views

 

android sdk3.1 have two org.webrtc .

Jar package structure:

libjingle_peerconnection.jar

META-INF

org.webrtc

woogeenbase.jar

com.intel.webrtc.base

META-INF

org.webrtc

Is it right?

allen_w_
Beginner
133 Views

 

Delete  

compile files('libs/libjingle_peerconnection.jar')

is  OK。

p2p sample running is ok now.

Chunbo_H_Intel1
Employee
133 Views

OK. Great to see the problem solved!

Reply