[英]Error converting bytecode to dex
I am pretty new to Android. 我刚接触Android。 When I build my current project I got this error: 构建当前项目时,出现以下错误:
Error:Error converting bytecode to dex: Cause: com.android.dex.DexException: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl; 错误:将字节码转换为dex时出错:原因:com.android.dex.DexException:多个dex文件定义了Landroid / support / v4 / accessibilityservice / AccessibilityServiceInfoCompat $ AccessibilityServiceInfoVersionImpl;
This is my dependencies: 这是我的依赖项:
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:23.+'
compile 'com.android.support:recyclerview-v7:23.+'
compile 'com.android.support:support-v4:23.+'
compile 'com.google.code.gson:gson:2.5'
compile 'com.makeramen:roundedimageview:2.2.1'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.daimajia.easing:library:1.0.1@aar'
compile 'com.daimajia.androidanimations:library:1.1.3@aar'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.android.support:support-v4:+'
compile 'com.squareup.picasso:picasso:2.3.2'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.daimajia.slider:library:1.1.5@aar'
compile 'de.hdodenhof:circleimageview:2.0.0'
compile 'com.facebook.android:facebook-android-sdk:4.5.0'
compile 'com.squareup.okhttp3:okhttp:3.2.0'
compile 'com.kyleduo.switchbutton:library:1.4.0'
compile files('libs/JTransforms-3.1-with-dependencies.jar')
compile 'com.github.Semantive:waveform-android:v1.2'
compile files('libs/TarsosDSP-Android-latest.jar')
}
I'm using gradle 2.13
and gradle-build 2.1
. 我正在使用gradle 2.13
和gradle-build 2.1
。
There were someone tell me to clean the project but it didn't work. 有人告诉我清理项目,但是没有用。 Please help. 请帮忙。
Thank you 谢谢
问题可能是您的任何Java类文件中的程序包名称错误,我也遇到了同样的问题,这是因为这个问题。请尝试重新构建项目并再次检查。
compile 'com.android.support:support-v4:23.+'
compile 'com.android.support:support-v4:+'
You have repeated a reference 您已重复引用
Well if i understand you question i hope this answer can help you. 好吧,如果我了解您的问题,希望这个答案可以对您有所帮助。
You can increase the memory size that the dexer process is allowed to use. 您可以增加允许dexer进程使用的内存大小。 Open the ini file that is located in: C:\\Users\\\\AppData\\Roaming\\Anywhere Software\\Basic4android Change this line:. 打开位于以下位置的ini文件:C:\\ Users \\\\ AppData \\ Roaming \\ Anywhere Software \\ Basic4android更改此行:。
MaxRamForDex=1024 To:. MaxRamForDex = 1024收件人:。
MaxRamForDex=1536 MaxRamForDex = 1536
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.