VS2015+Xamarin 打开Xaml报“Could not create the Java Virtual Machine” 解决方法
来源:互联网 发布:玄学通软件下载 编辑:程序博客网 时间:2024/05/01 22:38
原文地址:http://forums.xamarin.com/discussion/32365/connection-to-the-layout-renderer-failed-in-xs-5-7-and-xamarinvs-3-9 感谢原作者
安装完VS2015以及Xamarin后想打开xaml界面进行设计,结果报
Connection to the layout renderer failed. This may be be caused by a misconfiguration of Java.Please close and open the file again.
1:仔细查看了下 Sdk Manager 也都更新完毕了。不应该出现这个。然后检查下log
[1]: 日志文件在不同系统所在文件夹
Visual Studio: %LOCALAPPDATA%\Xamarin\Log\devenv*.log
Xamarin Studio on Windows: %LOCALAPPDATA%\XamarinStudio-5.0\Logs
Xamarin Studio on Mac: $HOME/Library/Logs/XamarinStudio-5.0
2:解决方法1 安装 Java JDK 1.8版本
从官网上下载Java JDK 1.8 并安装 (根据你的系统来选择安装64位或者X86 32位系统的 JDK).
- window+r 输入
regedit
打开注册表 并找到 “HKEY_CURRENT_USER\Software\Novell\Mono for Android” 目录,然后右键=》新建=》字符串值=》输入JavaSdkDirectory 名字 并且数值数据设置为安装Java JDK 1.8 后的路径如window 64位系统下的“C:\Program Files (x86)\Java\jdk1.8.0_31”,32位系统则是“C:\Program Files\Java\jdk1.8.0_31”(如果你安装了 Xamarin Studio 5.7已上更高的版本,你可以修改以下设置来实现,工具=>选项=>
SDK路径=>
安卓(Android)=>Java SDK (JDK)=>路径来修改,VS2015修改工具=>选项
)=>
Xamarin=>
Android Settings=>Java Development Kit Location 里面来修改 - 重新启动VS2015或者Xamarin后重新打开 点击Xaml看看。(Android的设计师现在应该使用Java 8,而不使用“maxpermsize”设置。https://blogs.oracle.com/poonam/entry/about_g1_garbage_collector_permanent)
3:解决方法2 对系统的的“maxpermsize”进行设置
- 创建或者更新系统里"_java_options"环境变量,变量值为:"XX:maxpermsize= 256M"(如果设置了256M不行的话,你可以进行往上或者往下调整下 内存数)
重新启动VS2015或者Xamarin后重新打开 点击Xaml看看。
- 其他解决方法可以参考 https://bugzilla.xamarin.com/show_bug.cgi?id=26026
有些地方翻译的不正确,敬请大家提出意见。 Tks ,Best wishes
0 0
- VS2015+Xamarin 打开Xaml报“Could not create the Java Virtual Machine” 解决方法
- 报错 Error:Could not create the Java Virtual Machine
- HDP出现Could not create the Java Virtual Machine解决方法
- could not create the java virtual machine
- "could not create the java virtual machine"
- "could not create the java virtual machine
- Could not create the Java virtual machine
- Could not create the Java Virtual Machine
- could not create the java virtual machine
- 解决Xamarin开发Android项目时的"Could not create the Java Virtual Machine"错误
- Myeclipse打开就出错Could not create the Java virtual machine
- Myeclipse打开就出错Could not create the Java virtual machine
- eclipse neon 版本打开 could not create the java virtual machine问题
- eclipse 安装后打开 could not create the java virtual machine 问题
- "could not create the java virtual machine"启动eclipse报错
- "could not create the java virtual machine"启动eclipse报错
- "could not create the java virtual machine"启动eclipse报错
- "could not create the java virtual machine"启动eclipse报错
- 新型程序设计语言:Braise语言!
- 人脸检测之Haar分类器
- Ubuntu14.04 源码安装MJPG-Streamer及使用
- ACM练习的建议
- xquery 除法 和节点个数
- VS2015+Xamarin 打开Xaml报“Could not create the Java Virtual Machine” 解决方法
- 黑马程序员——IO流
- JavaScript快速掌握
- QGIS python开发手册--使用栅格图层
- KMP 算法
- caffe proto文件,和配置文件
- C/C++ 中struct嵌套的内存分配
- Linux学习记录(1)安装VirtualBox虚拟机
- linux下C++开发常用工具