zwei1121

博客园 首页 新随笔 联系 订阅 管理

最近安装了VS2015,体验了一下android 的开发,按模板创建运行了个,试下效果很不错。也可以可视化设计。但昨天再次打开或创建一个android程序后,设计界面直接不能显示,显示错误:(可能是升级了什么SP,不太记得了)

Connection to the layout renderer failed。this my b caused by a misconfiguration of java.

Error: Could not create the Java Virtual Machine.Error: A fatal exception has occurred. Program will exit.

Could not create the Java Virtual Machine? 打开VS自带的android虚拟机管理,选择一个,可以运行。直接VS调试也可以在虚拟机里看到最终效果。就是不能可视化。

查看 Visual Studio : %LOCALAPPDATA%\Xamarin\Log\devenv*.log 。只看到报错,未见什么可以明确指出错误的提示。

只能到官网去看下了:

找到如下连接:http://forums.xamarin.com/discussion/32365/connection-to-the-layout-renderer-failed-in-xs-5-7-and-xamarinvs-3-9#latest

解决方式:

1.升级安装 JDK1.8 并修改注册表,及VS的JDK路径

2.设置用户环境变量

_JAVA_OPTIONS=-XX:MaxPermSize=256m,这个会对JAVA有影响

按照第二种方式处理后,再打开VS,设计器可正常工作。

posted on 2015-09-27 20:40  zwei  阅读(297)  评论(0编辑  收藏  举报