![](/img/trans.png)
[英]Visual Studio (xamarin) error "Xamarin.Android for Visual Studio requires Java Development Kit (JDK). Please click here to configure." 0
[英]“JDK (Java Development Kit) not Installed” when using Visual Studio Code with Titanum
我已经看到一些人在 VS Code 中使用钛扩展时遇到了这个确切的错误,但我还没有看到一个明确的解决方案。 任何想法将不胜感激。
当我单击“播放”以尝试运行我的“hello world”程序时,我看到了这个错误:原始错误
[ERROR] JDK (Java Development Kit) not installed.
[ERROR] If you already have installed the JDK, verify your JAVA_HOME environment variable is correctly set.
[ERROR] The JDK is required for Titanium and must be manually downloaded and installed from http://appcelerator.com/jdk.
在环境变量中,我通过选择适当的文件夹来设置 java_home:
并将路径设置为指向 bin 目录
如果我回显 java_home 它看起来是正确的。
编辑2020 年 5 月 19 日
当前应用信息
Name = Microsoft Windows 10 Pro
Version = 10.0.18362. All Rights Reserved.
Architecture = 64bit
# CPUs = 8
Memory = 15.9GB
Node.js
Node.js Version = 12.16.3
npm Version = 6.14.4
Appcelerator CLI
Installer = 5.0.0
Core Package = 8.0.0
Titanium CLI
CLI Version = 5.2.2
node-appc Version = 0.2.49
Titanium SDKs
9.0.1.GA
Version = 9.0.1
Install Location = C:\ProgramData\Titanium\mobilesdk\win32\9.0.1.GA
Platforms = android
git Hash = 466c007fd2
git Timestamp = 4/15/2020 21:37
node-appc Version = 0.3.4
Intel® Hardware Accelerated Execution Manager (HAXM)
Installed = yes
Memory Limit = 0 BYTES
Java Development Kit
Not found
Genymotion
Path = not found
Genymotion Executable = not found
Genymotion Player = not found
Home = not found
VirtualBox
Executable = not found
Version = unknown
Android SDK
Android Executable = not found
ADB Executable = not found
SDK Path = not found
Android NDK
NDK Path = not found
NDK Version = not found
Android Platforms
None
Android Add-Ons
None
Android Emulators
None
Genymotion Emulators
None
Connected Android Devices
Samsung Galaxy S10 (preview)
ID = 192.168.80.101:5555
State = device
SDK Version = 10 (android-29)
ABIs = x86
Java Development Kit Issues
× JDK (Java Development Kit) not installed.
If you already have installed the JDK, verify your JAVA_HOME environment variable is correctly
set.
The JDK is required for Titanium and must be manually downloaded and installed from
http://appcelerator.com/jdk.
Android Issues
× JDK (Java Development Kit) not found.
If you already have installed the JDK, verify your JAVA_HOME environment variable is correctly
set.
The JDK can be downloaded and installed from http://appcelerator.com/jdk.
我终于能够得到这种工作。 我不知道这些是否是灵丹妙药,但这就是我所做的。
这就是事情变得有趣的地方。 此时它仍然无法正常工作。 我一直在搞乱 java 家,但它仍然无法正常工作。 似乎它希望在这些更改之后重新启动,而仅仅关闭 VS Code 是不够的。 重新启动后,事情发生了变化 - VS Code 发现 java.home 和 java 主页不同步(一个在路径中有“bin”)而另一个没有。 运行 appc info 时,我可以看到突然间返回了更多以前没有的信息。
所以我从路径中删除了“bin”,突然它又开始工作了(我想我又重新启动了)。 我现在在模拟器中启动并运行了一段时间。 反正。 然后我收到 gradle java 堆错误,当我设置 java 选项并重新启动并重新启动时,我再次丢失了 jdk。 不管怎样……这就是我的故事。 #$%$%$#%$% 钛。
请安装 JAVA 1.8 (JDK 8)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.