简体   繁体   English

Android - Phonegap - 转换为Dalvik格式失败,错误1

[英]Android - Phonegap - Conversion to Dalvik format failed with error 1

I installed this: 我安装了这个:

https://github.com/mwbrooks/cordova-plugin-menu https://github.com/mwbrooks/cordova-plugin-menu

and have cordova 1.8.1 installed. 并安装了cordova 1.8.1

I copied "libs/phonegap-1.0.0.jar" to ANDROID_PROJECT/libs. 我将"libs/phonegap-1.0.0.jar"复制到ANDROID_PROJECT/libs.

When i try and run the app in the simulator, i get : 当我尝试在模拟器中运行应用程序时,我得到:

"Conversion to Dalvik format failed with error 1"

I believe this is to do with conflicts with libraries, but I don't know what to do to remove the error? 我相信这与图书馆的冲突有关,但我不知道如何去除错误?

please help. 请帮忙。

I have found myself in the same situation after upgrading from 2.0.0 to 2.1.0 从2.0.0升级到2.1.0后,我发现自己处于相同的状况

First of all make sure you have reconfigured the build path by removing the JAR from the old PhoneGap version and adding the new one. 首先,确保通过从旧的PhoneGap版本中删除JAR并添加新的JAR来重新配置构建路径。

At this point I started getting the Dalvik error. 此时我开始得到Dalvik错误。 Cleaning the build environment didn't help. 清理构建环境没有帮助。

So I remove the old jar from the libs directory and voilá, it worked. 所以我从libs目录中移除旧jar并且voilá,它有效。

Project -> Turn off Build Automatically. 项目 - >自动关闭构建。 Then Build project manually and clean. 然后手动构建项目并清理。 Then export signed project. 然后导出签名项目。 Problem has been gone. 问题已经消失。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM