2017-03-15 1 views
-1

정확하게 여기에 필요한 것을 알려주십시오. 동일한 소스가 Android Studio 에뮬레이터에서 실행되고 있지만 제 3 자 에뮬레이터에서 제대로 작동하는 것을 볼 수 있습니다. bluestacks 나는 다음과 같은 오류를 볼 수 있습니다.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') 

// 컴파일 파일 ('라이브러리/자바-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

이 프로젝트를 청소하는 시도를 실행 한 번만 다음에 추가 this.Try 이유는? – Radhey

+0

예, 캐시를 무효화하고 다시 시작하기 위해 깨끗한 옵션을 사용해 보았습니다. 제 3 자 에뮬레이터에서만이 문제를 겪고 있습니다. 네이티브 에뮬레이터 앱은 문제가 없습니다. – Codetoconnect

답변

1

이 문제는 일반적으로 왔을 때 동일한 클래스가 gradle에 두 번 추가됩니다. 당신이

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을 종속성에서 제거하고 캐시를 정리하고 빌드를 정리하면 Error : java.lang.OutOfMemoryError : GC 오버 헤드 한도 초과 오류가 표시됩니다. 하지만 경우에 둘 다 activeandroid를 사용하는 경우 에뮬레이터에서 애플 리케이션을 실행할 수 있지만 BlueStacks에서는 실행할 수 없습니다. 그래서 나는 이것이 어떻게 일어나고 있는지 혼동하지 않습니다. – Codetoconnect

관련 문제