Android的工作室1.0R:Java版本51.0的错误 [英] Android Studio 1.0R: Java version 51.0 error

查看:112
本文介绍了Android的工作室1.0R:Java版本51.0的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

随着新的的Andr​​oid工作室1.0 1.0发布候选我得到这个错误:

With the new Android Studio 1.0 1.0 Release Candidate I am getting this error:

不受支持的版本MAJOR.MINOR 51.0

我使用jdk1.7.0_60.jdk

I am using jdk1.7.0_60.jdk

一直在努力的,但没有成功:

Been trying those but with no success:

  • unsupported-major-minor-version-51-0
  • java-unsupported-major-minor-version-51-0
  • unsupported-major-minor-version-51-0

请帮忙

推荐答案

解决方案对我来说是编辑的Andr​​oid Studio.app/Contents/Info.plist

Solution:

Solution for me was to edit Android Studio.app/Contents/Info.plist

查找朝下方两行:

<key>JVMVersion</key>
<string>1.6*</string>

将其更改为 1.7 * ,所以它看起来像这样:

Change it to 1.7*, so that it looks like so:

<key>JVMVersion</key>
<string>1.7*</string>

然后重新启动您的IDE。

Then restart your IDE.

如果你像我一样,会提示您安装的Andr​​oid工作室(RC版本之前)时,安装Java 6为您的Mac,因为它要求,我并没有在当时安装了运行时(全新安装) 。这使这个默认的运行时的IDE(即使在它的项目与JDK 7内置)。这似乎与1.0 RC-1,他们提出了这个1.7。

If you're like me, you were prompted to install Java 6 for your Mac when installing Android Studio (before the RC release) because it required that and I didn't have a runtime installed at the time (clean install). This made this the default runtime for the IDE (even if projects within it are built with JDK 7). It seems with 1.0 RC-1, they raised this to 1.7.

您可以进入到Android工作室>关于Android的工作室检查它的使用运行时版本。

You can check the runtime version it's using by going to Android Studio > About Android Studio.

注意:这可能需要你你想要的补丁更新来更新下一次恢复它,有人<一个href=\"https://$c$c.google.com/p/android/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars&groupby=&sort=&id=80317\"相对=nofollow>这里报道,如果你编辑这个文件的补丁失败。我认为这是非常愚蠢和重质交给他们,希望他们尽快解决这一问题。

NOTE: This may require you to revert it the next time you want to update with the patch updater, as someone here reported that the patcher fails if you've edited this file. I think this is really dumb and heavy handed by them, and hopefully they address that issue soon.

这篇关于Android的工作室1.0R:Java版本51.0的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆