Bug 61297 - Desugar from a new project doesn't work at all (Java 8 > Java 7 Bytecode)
Summary: Desugar from a new project doesn't work at all (Java 8 > Java 7 Bytecode)
Status: NEW
Alias: None
Product: Android
Classification: Xamarin
Component: General ()
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2018-05-28 11:50 UTC by Jerome Liger
Modified: 2018-06-05 18:48 UTC (History)
1 user (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 61297 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
NEW

Description Jerome Liger 2018-05-28 11:50:55 UTC
Steps to Reproduce

- Create a new project (shared or pcl)
- Add in the csproj file sections : AndroidEnableDesugar > True

Actual Behavior
Dx fail with Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/devtools/build/android/desugar/runtime/ThrowableExtension;

Version Information
Build Tools v 27.0.3
Sdk tools 26.1.1
Platform : All

Log File
1> Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/devtools/build/android/desugar/runtime/ThrowableExtension;
1> Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/devtools/build/android/desugar/runtime/ThrowableExtension$AbstractDesugaringStrategy;
1> Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/devtools/build/android/desugar/runtime/ThrowableExtension$ConcurrentWeakIdentityHashMap;
1> Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/devtools/build/android/desugar/runtime/ThrowableExtension$ConcurrentWeakIdentityHashMap$WeakKey;
1> Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/devtools/build/android/desugar/runtime/ThrowableExtension$MimicDesugaringStrategy;
1> Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/devtools/build/android/desugar/runtime/ThrowableExtension$NullDesugaringStrategy;
1> Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/devtools/build/android/desugar/runtime/ThrowableExtension$ReuseDesugaringStrategy;
1> Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/devtools/build/android/desugar/runtime/ThrowableExtension;
1> Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/devtools/build/android/desugar/runtime/ThrowableExtension$AbstractDesugaringStrategy;
1>
1> UNEXPECTED TOP-LEVEL EXCEPTION:
1> java.lang.RuntimeException: Translation has been interrupted
1> at com.android.dx.command.dexer.Main.processAllFiles(Main.java:615)
1> at com.android.dx.command.dexer.Main.runMonoDex(Main.java:313)
1> at com.android.dx.command.dexer.Main.runDx(Main.java:291)
1> at com.android.dx.command.dexer.Main.main(Main.java:247)
1> at com.android.dx.command.Main.main(Main.java:94)
1> Caused by: java.lang.InterruptedException: Too many errors
1> at com.android.dx.command.dexer.Main.processAllFiles(Main.java:607)
1> ... 4 more
1>C:\Program Files (x
test01 - Copie.zip
86)\Microsoft Visual Studio\2017\Professional\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2254,3): error : java.lang.IllegalArgumentException: already added : Lcom/google/devtools/build/android/desugar/runtime/ThrowableExtension;
1> DexOutputs:
1>Exécution de la tâche "CompileToDalvik" terminée -- ÉCHEC.
1>Génération de la cible "_CompileToDalvikWithDx" terminée dans le projet "test01.Android.csproj" -- ÉCHEC.
1>
1>ÉCHEC de la build.
1>
1>"c:\test01\test01\test01.Android\test01.Android.csproj" (cible par défaut) (1) ->
1>(_CompileToDalvikWithDx cible) ->
1> C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2254,3): error : java.lang.IllegalArgumentException: already added : Lcom/google/devtools/build/android/desugar/runtime/ThrowableExtension;
1>
1> 0 Avertissement(s)
1> 1 Erreur(s)
1>
1>Temps écoulé 00:00:31.21
========== Génération : 0 a réussi, 1 a échoué, 0 mis à jour, 0 a été ignoré ==========

-->