简体   繁体   English

Android - “解析android-21的数据失败”

[英]Android - “Parsing Data for android-21 failed”

Had the following error in Eclipse after installing Android 5.0 (SDK 21) 安装Android 5.0后,Eclipse中出现以下错误(SDK 21)

"Loading data for Android 5.0" has encountered a problem. “为Android 5.0加载数据”遇到了问题。

Parsing Data for android-21 failed 解析android-21的数据失败
unsupported major.minor version 51.0 不支持的major.minor版本51.0

Initially I was facing the same issue. 最初我遇到了同样的问题。 I upgraded to JDK1.7. 我升级到JDK1.7。 Still issue persist. 仍然存在问题。 This is due to the fact that some time eclipse takees the default sdk as 1.6. 这是因为有些时候eclipse将默认sdk视为1.6。 To resolve this: 要解决此问题:

  1. Change the environmental path to point 1.7/1.8 将环境路径更改为1.7 / 1.8点
  2. Open Eclipse and goto windows tab-> preference 打开Eclipse并转到windows tab-> preference
  3. Goto Java->complier and set Compiler compliance level to 1.7 and press apply. 转到Java-> complier并将Compiler compliance level设置为1.7并按apply。
  4. Then Goto Installed JRE Section. 然后转到安装JRE部分。 check if the installed jdk is listed and selected in the list. 检查列表中是否列出并选择了已安装的jdk。 If not listed give the manual path using search. 如果未列出,请使用搜索提供手动路径。 then select the jdk version and remove other versions in the list. 然后选择jdk版本并删除列表中的其他版本。
  5. in installed JRE go to execution environment and select the intended java se version and check it in compatible section 在已安装的JRE中转到执行环境并选择预期的java se版本并在兼容部分中进行检查
  6. Presss ok and restart Eclipse. 按确定并重启Eclipse。

This should resolve the issue. 这应该解决问题。

I tried all above mention step, but not able to solve the problem. 我尝试了以上所有提到的步骤,但无法解决问题。 After some research, I got Solution of my problem. 经过一番研究,我得到了解决问题的方法。

check eclipse.ini to see -vm, (like "C:/Program Files/Java/jre7/bin/javaw.exe"). 检查eclipse.ini以查看-vm,(例如“C:/ Program Files / Java / jre7 / bin / javaw.exe”)。

i also have the problem you said and i found eclipse is started with java6. 我也有你说的问题,我发现eclipse是从java6开始的。 after i modify to use java7, there are no such fail dialog. 在我修改为使用java7后,没有这样的失败对话框。

  • So need to update SDK to 1.8 or 1.7. 因此需要将SDK更新为1.8或1.7。
  • set compiler to 1.7 or 1.8.. 将编译器设置为1.7或1.8 ..
  • then check eclipse.ini 然后检查eclipse.ini

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

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