typescript 错误:JDK 1.8 或更高版本的 ionic 2.1.8 要求检查失败
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/40586330/
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
Error: Requirements check failed for JDK 1.8 or greater for ionic 2.1.8
提问by S.Yadav
I have just updated my local machine setup and now config of it is as -
我刚刚更新了我的本地机器设置,现在它的配置是 -
******************************************************
Your system information:
Cordova CLI: 6.4.0
Ionic CLI Version: 2.1.8
Ionic App Lib Version: 2.1.4
ios-deploy version: Not installed
ios-sim version: 5.0.8
OS: OS X Yosemite
Node Version: v6.2.2
Xcode version: Xcode 7.2 Build version 7C68
******************************************************
Now i am getting error when i build for android (ionic build android) as-
现在,当我为 android (ionic build android) 构建时出现错误 -
Error: Requirements check failed for JDK 1.8 or greater
错误:JDK 1.8 或更高版本的需求检查失败
Need help!!!
需要帮忙!!!
采纳答案by S.Yadav
I got solution of this issue,
我得到了这个问题的解决方案,
It mean to say that I have older version of SDK, as per new setup it need at-least SDK-1.8 to get run build of the application.
这意味着我有旧版本的 SDK,根据新设置,它至少需要 SDK-1.8 才能运行应用程序构建。
For that I downloaded new version of SDK from here.
And then updated my SDK version using this article.
为此,我从这里下载了新版本的 SDK 。
然后使用这篇文章更新了我的 SDK 版本。
After that when I run this command-
之后,当我运行此命令时-
ionic run android
It worked for me.
它对我有用。
回答by hlopezvg
If you are using Ubuntu, you could do the following, too:
如果您使用的是 Ubuntu,您也可以执行以下操作:
sudo update-alternatives --config javac
That worked for me.
那对我有用。
For more information about installing java/javac using update-alternatives, please refer to: How do I make java default to a manually installed JRE/JDK?
有关使用 update-alternatives 安装 java/javac 的更多信息,请参阅:如何使 java 默认为手动安装的 JRE/JDK?
回答by Dipen Patel
So I found that Ionic at the time of post-Cordova does not like JDK above 1.8.
所以我发现后Cordova的时候的Ionic不喜欢1.8以上的JDK。
- To Solve get JDK 8.
- Remove any JDK or JRE version higher than version 8 because it will automatically look for the highest version JDK the Java folder in c drive.
- 解决得到JDK 8。
- 删除任何高于版本 8 的 JDK 或 JRE 版本,因为它会自动在 c 驱动器中的 Java 文件夹中查找最高版本的 JDK。
OR
或者
- Next solution is to just change what JDK Cordova looks for to version 8.
- 下一个解决方案是将 JDK Cordova 查找的内容更改为版本 8。
回答by agnanzakariya
This is my best option for my case, I use Cordova 6.2 version (not latest). I've worked with 1.7 Java as long as I can follow the technology from them. But since Cordova upgrade their system, now they prepare using 1.8 to implemented. If I not wrong, since 6.3 version their using that. I work in Snow Leopard with 1.7 java, it's hard to move on to upgrade my OS since I use old Macbook, I don't have several choice here.
这是我的最佳选择,我使用 Cordova 6.2 版本(不是最新的)。只要我能遵循他们的技术,我就一直在使用 1.7 Java。但是自从 Cordova 升级他们的系统后,现在他们准备使用 1.8 来实现。如果我没记错的话,他们从 6.3 版本开始使用那个。我在 Snow Leopard 使用 1.7 java 工作,因为我使用旧的 Macbook,所以很难继续升级我的操作系统,我在这里没有几个选择。