title: Xamarin Java.exe exited with code 1 (Proguard Issue)
body: <p>Another day with Xamarin! Can't even build my first <code>Hello World</code> project! Not surprising, huh?</p>
  
  <p>So, fresh new <code>Xamarin.Android</code> blank project. Enabled <strong>ProGuard</strong>, link to <strong>SDK Assemblies Only</strong> and went on building the project. And <strong><em>wallah!!</em></strong> There's an error!(Wait, i shouldn't be surprised, right? After all, it's Xamarin). Here's the error :</p>
  
  <blockquote>
    <p>"java.exe" exited with code 1</p>
  </blockquote>
  
  <p>Double-clicking the exception opens up <code>Xamarin.Android.Common.Targets</code> file and points to the <code>ProGuard</code> tag which is as follows :</p>
  
  <pre><code>&lt;Proguard
  Condition="'$(AndroidEnableProguard)' == 'True' and '$(_ProguardProjectConfiguration)' != ''"
  ProguardJarPath="$(ProguardJarPath)"
  AndroidSdkDirectory="$(_AndroidSdkDirectory)"
  JavaToolPath="$(JavaToolPath)"
  ProguardToolPath="$(ProguardToolPath)"
  ToolExe="$(ProguardToolExe)"
  UseProguard="$(UseProguard)"
  JavaPlatformJarPath="$(JavaPlatformJarPath)"
  ClassesOutputDirectory="$(IntermediateOutputPath)android\bin\classes"
  AcwMapFile="$(_AcwMapFile)"
  ProguardCommonXamarinConfiguration="$(IntermediateOutputPath)proguard\proguard_xamarin.cfg"
  ProguardGeneratedReferenceConfiguration="$(_ProguardProjectConfiguration)"
  ProguardGeneratedApplicationConfiguration="$(IntermediateOutputPath)proguard\proguard_project_primary.cfg"
  ProguardConfigurationFiles="$(ProguardConfigFiles)"
  JavaLibrariesToEmbed="@(_JarsToProguard);@(_InstantRunJavaReference)"
  ExternalJavaLibraries="@(AndroidExternalJavaLibrary)"
  DoNotPackageJavaLibraries="@(_ResolvedDoNotPackageAttributes)"
  ProguardJarOutput="$(IntermediateOutputPath)proguard\__proguard_output__.jar"
  EnableLogging="$(ProguardEnableLogging)"
  DumpOutput="$(IntermediateOutputPath)proguard\dump.txt"
  PrintSeedsOutput="$(IntermediateOutputPath)proguard\seeds.txt"
  PrintUsageOutput="$(IntermediateOutputPath)proguard\usage.txt"
  PrintMappingOutput="$(IntermediateOutputPath)proguard\mapping.txt"
  ProguardInputJarFilter="$(_AndroidProguardInputJarFilter)"
  /&gt;
  </code></pre>
  
  <p>So, my best guess was that it might be a <strong>ProGuard</strong> related issue. So, searched up google and applied all fixes i found so far :</p>
  
  <ul>
  <li>Updated Android SDK</li>
  <li>Set Java heap size to 1G(and even 5G)</li>
  <li>Enabled Multi-Dex</li>
  <li>Updated ProGuard</li>
  <li>Created a new proguard.cfg file in solution(of course set <code>build action</code> to <code>ProGuardConfiguration</code> and added custom lines that are necessary.</li>
  </ul>
  
  <p>But still, same error pointing to the same <code>ProGuard</code> tag. Now before anybody starts bashing me saying i could've messed up the proguard configuratiom file, here's the link to it:</p>
  
  <ul>
  <li><a href="https://pastebin.com/HYREQWkr" rel="noreferrer">ProGuard.cfg</a></li>
  <li><a href="https://www69.zippyshare.com/d/Lw4QIKrC/274982/vs-Build-log.txt" rel="noreferrer">Build Output From Visual Studio 2017</a></li>
  </ul>
  
  <p>I have read that this is a very common issue in Xamarin. So, i guess, somebody might have come up with a solution that <strong>really works!</strong>. So, any fixes or ideas on what i might be missing?</p>