Build fails with `Xamarin.Android.D8.targets(79,5): MSB6006 "java.exe" exited with code 1`
See original GitHub issueDescription
After update to preview11 app fails to build with: https://github.com/maxkoshevoi/NureTimetable/runs/4721371318?check_suite_focus=true#step:6:25
C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\31.0.101-preview.11.117\tools\Xamarin.Android.D8.targets(79,5): error MSB6006: "java.exe" exited with code 1.
It has been building fine in preview 10.
Steps to Reproduce
- Build this app https://github.com/maxkoshevoi/NureTimetable/tree/0f02e8f8ac5a927e97fb5e0ceee2a0dde78764d2 using preview 11
Version with bug
Preview 11
Last version that worked well
Preview 10 (current)
Affected platforms
Android
Affected platform versions
All
Did you find any workaround?
Works, but not always:
<Target Name="Remove1B1B3F705C33DF84" AfterTargets="_CheckDuplicateJavaLibraries">
<ItemGroup>
<ExtractedJarImportsToRemove Include="@(ExtractedJarImports)" Condition="'%(Filename)' == '1B1B3F705C33DF84'" />
<ExtractedJarImports Remove="@(ExtractedJarImportsToRemove)" />
</ItemGroup>
</Target>
Relevant log output
Type com.google.common.util.concurrent.ListenableFuture is defined multiple times
Error in C:\Users\Mi\.nuget\packages\xamarin.google.guava.listenablefuture\1.0.0.4\buildTransitive
et6.0-android31.0\..\..\jar\guava-listenablefuture.jar:com/google/common/util/concurrent/ListenableFuture.class:
Type com.google.common.util.concurrent.ListenableFuture is defined multiple times: C:\Users\Mi\.nuget\packages\xamarin.google.guava.listenablefuture\1.0.0.4\buildTransitive
et6.0-android31.0\..\..\jar\guava-listenablefuture.jar:com/google/common/util/concurrent/ListenableFuture.class, obj\Debug
et6.0-android31\lp\133\jl\libs\009E21B983A37ED6.jar:com/google/common/util/concurrent/ListenableFuture.class
Compilation failed
MSB6006: "java.exe" exited with code 1.
Done executing task "D8" -- FAILED.
Done building target "_CompileToDalvik" in project "NureTimetable.csproj" -- FAILED.
Done building project "NureTimetable.csproj" -- FAILED.
Build FAILED.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:17 (7 by maintainers)
Top Results From Across the Web
Xamarin android project "java.exe" exited with code 1
Android. D8. targets(51,5)) of the 'java.exe exited with code 1' error type is mostly associated with either proguard or incompability however ...
Read more >Xamarin.Android error MSB6006: "java.exe" exited with ...
I can conclude that the issue is related to proguard (also for the Debug build, even if you are not selected the code...
Read more >error MSB6006: "java.exe" exited with code 1.
I am trying to develop app with Xamarin.Android in Visual Studio ... Android.D8.targets(51,5): error MSB6006: "java.exe" exited with code 1.
Read more >"java.exe" exited with code 1 - Xamarin
I have the following error with Visual Studio 2019 - Xamarin. ... Android.D8.targets(79,5): error MSB6006: "java.exe" salió con el código 1.
Read more >Xamarin/Android fails to compile in VS 2019
I am using Visual Studio 2019 and Xamarin Forms v4.8. ... Android.D8.targets(79,5): error MSB6006: "java.exe" exited with code 1.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Are you on MAUI?
Installing syncfusion or Maui community toolkit in the newly created Maui program will both cause this problem.