Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.RuntimeException when Debugging to an Android Emulator #3

Open
jameskolts opened this issue Jun 7, 2022 · 6 comments
Open

Comments

@jameskolts
Copy link

Seems to work on the windows machine when debugging, but when deplying to an emulator for a Pixel 5 - API 30 The following exception occurs and the build fails.

Severity Code Description Project File Line Suppression State Error java.lang.RuntimeException: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: ...\packages\xamarin.google.guava.listenablefuture\1.0.0.5\buildTransitive\net6.0-android31.0\..\..\jar\guava-listenablefuture.jar : com/google/common/util/concurrent/ListenableFuture.class ...\dotnet\packs\Microsoft.Android.Sdk.Windows\32.0.301\tools\Xamarin.Android.D8.targets 79

@MUJaCHe66
Copy link

Same problem.

@swagataaich
Copy link

Seems like I'm also facing this same problem. Happens when I try deploying on both Pixel XL (API 30) and iPhone 11 (iOS 15). Is there a fix/workaround for it?

@hallon-heyman
Copy link

Same problem.

1 similar comment
@BrankoIlic
Copy link

Same problem.

@Damus765
Copy link

I had the same issue. I found a workaround that worked for me.

In the .csproj file of your Maui project, find the <PropertyGroup> tag that contains the <PackageReference> elements, and add the following additional <PackageReference> element to that list:

<PackageReference Include="Xamarin.Google.Guava.ListenableFuture" ExcludeAssets="build;buildTransitive" Condition="'$(TargetFramework)' == 'net7.0-android'">
	<Version>1.0.0.10</Version>
</PackageReference>

You may have to change the 'net7.0-android' in the condition based on your own TargetFrameworks.
Also make sure the version correspond to the installed version of your Xamarin.Google.Guava.ListenableFuture package.

@Raffro
Copy link

Raffro commented Feb 15, 2024

I had the same issue. I found a workaround that worked for me.

In the .csproj file of your Maui project, find the tag that contains the elements, and add the following additional element to that list:

<PackageReference Include="Xamarin.Google.Guava.ListenableFuture" ExcludeAssets="build;buildTransitive" Condition="'$(TargetFramework)' == 'net7.0-android'">
	<Version>1.0.0.10</Version>
</PackageReference>

You may have to change the 'net7.0-android' in the condition based on your own TargetFrameworks. Also make sure the version correspond to the installed version of your Xamarin.Google.Guava.ListenableFuture package.

I had the same problem but this workaround fixed it for me. Except i had to adapt the version of that package because in my project it was 1.0.0.17 referenced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants