更新的Android项目外部JAR [英] Update External Jar in Android Project
问题描述
所有的,我有我添加到我的Android项目的外部JAR。然而,正如我的罐子一直被更新和改变。当更新我的JAR,我得到的Dalvik虚拟机幻数错误。
All, I have an external JAR that I'm adding to my Android project. However, as my jar is consistently updating and changing. When I update my JAR, I get the dalvik VM magic number error.
我不明白,我应该如何解决这个问题?
I don't understand how I'm supposed to fix this?
下面是我遵循的步骤。
添加JAR最初
- 复制的JAR
库
文件夹 - 运行项目
在我的项目
我的JAR被拾起,安装皆大欢喜。
My JAR is picked up, installed everyone is happy.
更新罐
- 在Eclipse中,转到罐子
库
键,右键 - >删除 。 - 我的新的jar(同名)复制到
库
文件夹中。 - 接收
坏的类文件魔术
错误。
- In Eclipse, go to the jar in
libs
and right click -> delete. - Copy my new jar (same name) into the
libs
folder. - Receive
bad class file magic
error.
我的故障排除到目前为止
- 在Eclipse中,
项目 - >清洁...
- 选择我的项目,清洁。
- 运行它。同样的错误......神奇数字
- 项目属性 - > Java构建路径 - >删除
Android的私家藏书
- In eclipse,
Project -> Clean...
- Select my project, clean it.
- Run it. Same error... magic number
- Project Properties -> Java Build Path -> Remove
Android Private Libraries
现在的私人图书馆没有被重新添加。 (这相当于在缺少我的Java项目进口)为什么这是一个噩梦?有什么建议?
Now the private libraries aren't being re-added. (Which equates to missing imports in my Java project) Why is this a nightmare? Any suggestions?
推荐答案
原来,我的问题是由多个JDK的我造成的。 Android的被默认为使用JDK 1.7,而我的控制台罐子使用JDK 1.8
Turns out that my issue was caused by the multiple JDK's I had. Android was defaulting to use JDK 1.7 while my console jar was using JDK 1.8
这篇关于更新的Android项目外部JAR的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!