Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xamarin.Forms "java.exe" exited with code 1 in debug mode

Installed Xamarin.GooglePlayServices.Base and Xamarin.Firebase.Messaging and am now getting this error when building the solution. Heap size is 1GB, and from googling everywhere I understand it must be some kind of dependency issue among the nuget packages, however I have no idea how to fix this. Below is a list of my android packages, any more info will be provided if needed, I simply don't know what else you might need, I'm rather new at this.

enter image description here enter image description here enter image description here enter image description here

like image 839
Thoft Avatar asked Dec 10 '25 11:12

Thoft


1 Answers

Found a solution on github (thanks to Lucas Zhang for the link).

1: Open the .csproj project file for the Xamarin.Android app project in Visual Studio or another text editor.

2: Find the tag that contains the elements for the project, and add the following additional element to that list:

<PackageReference Include="Xamarin.Google.Guava" ExcludeAssets="all">
  <Version>27.1.0</Version>
</PackageReference>

3: Delete the obj\project.assets.json file and close and reopen the solution to force the NuGet packages to re-restore.

like image 57
Thoft Avatar answered Dec 12 '25 11:12

Thoft



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!