Intellect Wizard Intellect Wizard - 1 month ago 12
Android Question

"java.exe" exited with code 1 Error while running xamarin.android app

I am new to xamarin.android apps.
i download the one maps project from http://developer.xamarin.com/samples/MapsAndLocationDemo/
and i'm trying to run the app in visual studio 2013, while debugging i'm getting error like "Java.exe" exited with code 1.
i'm trying to solve it but i failed.
i also faced some other problems, at last i solve those. but this error is still there.
when i try to find the error it show the code like below

<CompileToDalvik
DxJarPath="$(DxJarPath)"
JavaToolPath="$(JavaToolPath)"
JavaMaximumHeapSize="$(JavaMaximumHeapSize)"
JavaOptions="$(JavaOptions)"
ClassesOutputDirectory="$(IntermediateOutputPath)android\bin\classes"
MonoPlatformJarPath="$(MonoPlatformJarPath)"
JavaSourceFiles="@(AndroidJavaSource)"
JavaLibraries="@(AndroidJavaLibrary)"
ExternalJavaLibraries="@(AndroidExternalJavaLibrary)"
LibraryProjectJars="$(IntermediateOutputPath)__library_projects__\*.jar"
DoNotPackageJavaLibraries="@(_ResolvedDoNotPackageAttributes)"
ToolPath="$(DxToolPath)"
ToolExe="$(DxToolExe)"
UseDx="$(UseDx)"
AdditionalJavaLibraryReferences="@(_AdditionalJavaLibraryReferences)"
/>


File path location "C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets"
if any one face similar problem please help me to rectify the problem.
Thanks in advance.

Answer

It looks like the program was trying to allocate too much space to the Java Heap. You can change this by going to the Android Project Options > Android Build > Advanced and then changing the Java Heap size to 1G.