我创建了一个简单的应用程序,其中包含一个跟踪器和一个导出为 sdk 的简单对象。现在我已经将项目导入到 eclipse 中,但它显示以下错误:
无法执行dex:多个dex文件定义了Lcom/metaio/BuildConfig;
有什么解决办法?
最初的错误是无法找到 .apk 文件,所以我在互联网上找到了一个解决方案,即从项目属性中取消选中“是库”。
谢谢你
I got the same problem while importing metaio SDK module into my Android project.
Here is the answer: Metaio SDK has a class com.metaio.BuildConfig
. When the library project is built with Android build tool, it automatically created a class with the same name "com.metaio.BuildConfig"
. Hence the class indeed is being defined twice!
So my solution is to rename the package name in the AndroidMenifest.xml
of the metaio SDK module / project to something else like "com.metaiosdk"
. After that, the app builds & runs smoothly.