Bug 56173 - Adding "Java max heap size" flag overwrote java.exe giving "The layout renderer could not be started"
Summary: Adding "Java max heap size" flag overwrote java.exe giving "The layout render...
Alias: None
Product: Android
Classification: Xamarin
Component: MSBuild ()
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: dean.ellis
Depends on:
Reported: 2017-05-10 12:31 UTC by uwantfries
Modified: 2017-08-21 20:37 UTC (History)
4 users (show)

Tags: bb
Is this bug a regression?: ---
Last known good build:

Zipped logfiles (36.55 KB, application/x-zip-compressed)
2017-05-10 12:31 UTC, uwantfries

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description uwantfries 2017-05-10 12:31:25 UTC
Created attachment 22059 [details]
Zipped logfiles

Xamarin forms app using VS2015
Added Java max heap size setting then then shortly afterwards I started getting the following message: 

Severity	Code	Description	Project	File	Line	Suppression State
Error		Project XApp.Android cannot build using Android 7.1 (API Level 25 - Nougat) because The layout renderer could not be started. This may be caused by a misconfiguration of Java
Please install it or set Java Development Kit path for Oracle 1.8+ on Tools->Options->Xamarin->Android Settings menu.		 	0	

Turns out my JDK java.exe file located in C:\Android\Java\jdk1.8.0_131\bin\java.exe had got overwritten with the following contents:

'-Xmx1G' is not recognized as an internal or external command,
operable program or batch file.

Comment 1 Mark McLemore 2017-06-27 18:40:45 UTC
Thank you for taking the time to submit the bug. We are unable to reproduce this issue from the description. 

Can you tell us what value of Java max heap size you used? 

Also, if you could please attach a reproduction to the bug by starting with a clean Xamarin.Forms project and adding just the code necessary to demonstrate the issue, we would very much appreciate it.
Comment 2 Jon Douglas [MSFT] 2017-08-21 20:37:50 UTC
Because we have not received a reply to our request for more information we are closing this issue. If you are still encountering this issue, please reopen the ticket with the requested information. Secondly, please upload a MSBuild diagnostic output log which will show the command used.