Android - “Parsing Data for android-21 failed”

北慕城南 提交于 2019-11-26 18:22:59

问题


Had the following error in Eclipse after installing Android 5.0 (SDK 21)

"Loading data for Android 5.0" has encountered a problem.

Parsing Data for android-21 failed
unsupported major.minor version 51.0


回答1:


Try installing JDK 1.8 and reload Eclipse.

http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html




回答2:


Initially I was facing the same issue. I upgraded to JDK1.7. Still issue persist. This is due to the fact that some time eclipse takees the default sdk as 1.6. To resolve this:

  1. Change the environmental path to point 1.7/1.8
  2. Open Eclipse and goto windows tab-> preference
  3. Goto Java->complier and set Compiler compliance level to 1.7 and press apply.
  4. Then Goto Installed JRE Section. check if the installed jdk is listed and selected in the list. If not listed give the manual path using search. then select the jdk version and remove other versions in the list.
  5. in installed JRE go to execution environment and select the intended java se version and check it in compatible section
  6. Presss ok and restart Eclipse.

This should resolve the issue.




回答3:


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").

i also have the problem you said and i found eclipse is started with java6. after i modify to use java7, there are no such fail dialog.

  • So need to update SDK to 1.8 or 1.7.
  • set compiler to 1.7 or 1.8..
  • then check eclipse.ini



回答4:


Installing JDK 1.8 and reload Eclipse worked for me

http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html



来源:https://stackoverflow.com/questions/26474298/android-parsing-data-for-android-21-failed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!