2017-03-15 16 views
-1

ここに正確に必要なものを教えてください、私は同じソースがAndroid Studio Emulatorsではうまく動作していますが、私はエラーの後で見ることができます。TransformException:java.util.zip.ZipException:重複エントリ:com/activeandroid/ActiveAndroid.class

Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'. 

com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/activeandroid/ActiveAndroid.class

ここに私のGradleの依存関係を確認してください。

dependencies { 
apt "org.androidannotations:androidannotations:$AAVersion" 
compile "org.androidannotations:androidannotations-api:$AAVersion" 
compile files('library/android-viewbadger.jar') 
compile files('library/robobinding-0.8.1.jar') 
compile files('library/activeandroid-3.1-SNAPSHOT.jar') 
compile project(':Android-Validator') 

//コンパイルしたファイルは、( 'ライブラリ/ javaの-RT-ジャースタブ-1.5.0.jar') }

dependencies { 
testCompile 'junit:junit:4.12' 
compile 'com.android.support:design:25.0.1' 
compile ('com.android.support:appcompat-v7:25.0.1'){ 
    exclude module: 'support-v4' 
} 
compile 'com.viewpagerindicator:library:[email protected]' 
compile 'com.f2prateek.progressbutton:progressbutton:[email protected]' 
compile files('library/afreechart-0.0.4.jar') 
compile 'commons-io:commons-io:+' 
compile 'com.google.code.gson:gson:2.2.+' 
compile 'com.google.guava:guava:16+' 
compile 'joda-time:joda-time:2.9.4' 
compile 'org.apache.commons:commons-collections4:4.1' 
compile 'org.springframework.android:spring-android-rest-template:1.0.1.RELEASE' 
compile 'com.sun.codemodel:codemodel:2.4.1' 
compile 'org.apache.httpcomponents:httpmime:4.5.1' 
compile 'ch.acra:acra:4.9.0' 
compile 'org.jsoup:jsoup:1.10.2' 
compile 'org.apache.commons:commons-lang3:3.4' 
compile ('org.simpleframework:simple-xml:2.7.1'){ 
    exclude module: 'stax' 
    exclude module: 'stax-api' 
    exclude module: 'xpp3' 
} 
compile files('library/pdfjet-5.75.jar') 
compile 'log4j:log4j:1.2.17' 
compile 'com.splunk:mint-android-sdk:5.2.1' 
compile 'de.mindpipe.android:android-logging-log4j:1.0.3' 
compile files('library/ksoap2-android-assembly-2.5.8-jar-with-dependencies.jar') 
compile 'com.michaelpardo:activeandroid:3.1.0-SNAPSHOT' 

は}

+0

を実行しているのはなぜ は、あなたのプロジェクトをきれいにしようとしましたか? – Radhey

+0

はい、キャッシュを無効にして再起動するだけでなく、クリーンなオプションを試しました。この問題はサードパーティエミュレータでのみ発生しています。ネイティブエミュレータアプリケーションは問題ありません。 – Codetoconnect

答えて

1

この問題は通常、来たとき、同じクラスがgradleに2回追加されます。あなたはこれがthis.Tryは一度だけ、それを追加する理由です

compile files('library/activeandroid-3.1-SNAPSHOT.jar') 

compile 'com.michaelpardo:activeandroid:3.1.0-SNAPSHOT' 

を使用して、その後のGradleを構築し、

+0

これを指摘してくれてありがとう@Android Geekですが、activeandroid-3.1-SNAPSHOT.jarを依存関係から削除し、キャッシュをクリーンにしてビルドして、エラー:java.lang.OutOfMemoryError:GCオーバーヘッド限界を超えました。しかし、私は両方のactiveandroidを使用する場合私はエミュレータではなく、BlueStacksでアプリを実行することができます。だから私はこれがどうなっているのかちょっと混乱している。 – Codetoconnect

関連する問題