eclipse SecurityException:无法找到 dex.jar 的字段
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/13479503/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
SecurityException: Unable to find field for dex.jar
提问by Serkan
How do I solve this error? I tried:
我该如何解决这个错误?我试过:
Refreshing the project, and rebuilding.
Cleaning the project, and rebuilding.
Closing and reopening the project, and rebuilding
Deleting the project (but not deleting the files — that's a checkbox on the project deletion confirmation dialog), and re- importing it as an existing project, and cleaning and rebuilding.
Deleting the project, deleting the
.project
and.classpath
files in the project, and creating a new project using my files as existing sources.
刷新项目,并重建。
清理项目,并重建。
关闭并重新打开项目,并重建
删除项目(但不删除文件——这是项目删除确认对话框上的一个复选框),并将其作为现有项目重新导入,并进行清理和重建。
删除项目,删除项目中的
.project
和.classpath
文件,并使用我的文件作为现有源创建一个新项目。
None of these worked. How do I solve this problem?
这些都没有奏效。我该如何解决这个问题?
采纳答案by abc
update platform sdk version to rev 21 it can be solved. I updated platform SDK from rev 20 to rev 21, and restart eclipse, it's solved.
将平台 sdk 版本更新为 rev 21 即可解决。我将平台 SDK 从 rev 20 更新到 rev 21,并重新启动 eclipse,它已解决。
回答by Proghero
Did this happen after you updated the Android-SDK or something like that? Have you tried to uninstall it and install again?
这是在您更新 Android-SDK 或类似内容后发生的吗?您是否尝试将其卸载并重新安装?
I just had the same problem and the only solution I found was: - Uninstall Android SDK (as plugin in Eclipse as well and delete manually any related file you can find in the Eclipse directory) - Get the newest Android-SDK - Install it again
我刚刚遇到了同样的问题,我找到的唯一解决方案是: - 卸载 Android SDK(作为 Eclipse 中的插件,并手动删除您可以在 Eclipse 目录中找到的任何相关文件) - 获取最新的 Android-SDK - 再次安装
I hope it helps in your case too!
我希望它对你的情况也有帮助!
回答by Skymt
This error may stem from a faulty batch file in android sdk.
此错误可能源于 android sdk 中的错误批处理文件。
The following fixed worked for me
以下固定对我有用
- Open the file
find_java.bat
found inandroid-sdk\tools\lib
- Find the line
for /f %%a in ('%~dps0\find_java.exe -s -w') do set javaw_exe=%%a
- Remove "-s";
for /f %%a in ('%~dps0\find_java.exe -w') do set javaw_exe=%%a
- Save the file, and restart eclipse.
- 打开
find_java.bat
找到的文件android-sdk\tools\lib
- 找到线
for /f %%a in ('%~dps0\find_java.exe -s -w') do set javaw_exe=%%a
- 删除“-s”;
for /f %%a in ('%~dps0\find_java.exe -w') do set javaw_exe=%%a
- 保存文件,然后重新启动 eclipse。