Thoft
Thoft

Reputation: 75

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

Upvotes: 3

Views: 5558

Answers (2)

Junaid Pathan
Junaid Pathan

Reputation: 4336

Try Cleaning and Building the Solution, it worked for me.

  • On Menubar click Build -> Clean solution.

  • After cleaning the solution is completed, run the Project.

Upvotes: 0

Thoft
Thoft

Reputation: 75

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.

Upvotes: 2

Related Questions