简体   繁体   English

为什么我们得到多个dex文件在android中定义错误

[英]Why we get Multiple dex files define error in android

I am creating a jar file where i did right click on project name then export>java>Jar file and then i checked on export generated class files and resources by selecting only src folder files and classpath and .project file. 我正在创建一个jar文件,在其中我确实右键单击了项目名称,然后export>java>Jar file ,然后通过仅选择src文件夹文件以及classpath和.project文件检查了export generated class files and resources

This jar file i tried to use in another android project and i am getting this above 我试图在另一个android项目中使用此jar文件,我在上面

Unable to execute dex: Multiple dex files define com/example/projectname/xyzClass

So i followed this link here and unchecked my jar in order and export of buildpath and if i do so i am getting another error java.lang.NoClassDefFoundError: com.example.xyzClass 所以我在这里点击了此链接并取消了对jar的检查,并按顺序导出了buildpath,如果这样做,我将收到另一个错误java.lang.NoClassDefFoundError: com.example.xyzClass

I have no idea why i am getting `Unable to execute dex: Multiple dex files define' error. 我不知道为什么会出现“无法执行dex:多个dex文件定义”错误。

And here is the screenshot of order and export of my project where i am using my servicedemonew2.jar file. 这是我使用servicedemonew2.jar文件的项目的订购和出口的屏幕截图。 在此处输入图片说明

I would be glad if someone assist me with this why and when do we get this above error. 如果有人为我提供帮助,为什么以及何时出现上述错误,我将感到非常高兴。

After seen your screenshot you need to uncheck your Android Dependencies and servicedemonew2.jar checkbox. 看完屏幕截图后,您需要取消选中Android Dependenciesservicedemonew2.jar复选框。 Android Private Libraries will be remain checkable. Android Private Libraries将保持可检查状态。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 错误:com.android.dex.DexException:多个dex文件定义了Ledu / umd / cs / findbugs / annotations / NonNull; - Error:com.android.dex.DexException: Multiple dex files define Ledu/umd/cs/findbugs/annotations/NonNull; Android多个dex文件定义问题 - Android Multiple dex files define issue Android Studio多个dex文件定义 - Android Studio Multiple dex files define Android Studio 3.4多个dex文件定义 - Android Studio 3.4 Multiple dex files define Android Studio中定义了多个dex文件 - Multiple dex files define in Android Studio Eclipse / Java / Android无法执行dex:定义了多个dex文件 - Eclipse/Java/Android Unable to execute dex: Multiple dex files define 将字节码转换为dex时出错:原因:com.android.dex.DexException:多个dex文件定义了Lcom / RNFetchBlob / RNFetchBlobConst; - Error converting bytecode to dex: Cause: com.android.dex.DexException: Multiple dex files define Lcom/RNFetchBlob/RNFetchBlobConst; Android Socialize SDK:无法执行dex:多个dex文件定义 - Android Socialize SDK: Unable to execute dex: Multiple dex files define Crashlytics多个dex文件定义错误 - Crashlytics Multiple dex files define error 将字节码转换为dex:原因:com.android.dex.DexException:定义了多个dex文件 - converting bytecode to dex: Cause: com.android.dex.DexException: Multiple dex files define
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM