Skip to content

Binding Project - Error with Desugaring #1639

Closed

Description

@eclipsed4utoo

I am attempting to write a binding for a third-party library. That library makes use of Java 8 features. Because of this, I have to use desugaring.

I seem to be running into an issue with desugaring, and I'm not sure where I am going wrong. Without desugaring, I get 4 build errors about missing java features. When I enable desugaring, I get one build error.

Error: java.lang.TypeNotPresentException : Type io.reactivex.functions.Action not present

The third-party library does use rxjava2, and the Action type is in the .jar(used JD-GUI to look in the jar).

I've done tons of searching and having been able to figure out what is going on or how to fix it. I'm hoping somebody with Xamarin could help.

Steps to Reproduce

  1. Build the attached solution
  2. See build error
    BindingTest.zip

Expected Behavior

Android project should build.

Actual Behavior

Android project does not build.

Version Information

=== Visual Studio Community 2017 for Mac ===

Version 7.4.3 (build 10)
Installation UUID: cb04a5a4-cb32-4108-987e-e5123c1b9a67
Runtime:
Mono 5.8.1.0 (2017-10/6bf3922f3fd) (64-bit)
GTK+ 2.24.23 (Raleigh theme)

Package version: 508010000

=== NuGet ===

Version: 4.3.1.4445

=== .NET Core ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
2.0.5
2.0.0
1.1.1
1.0.4
SDK: /usr/local/share/dotnet/sdk/2.1.4/Sdks
SDK Versions:
2.1.4
2.0.0
1.0.3
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.8.1/lib/mono/msbuild/15.0/bin/Sdks

=== Xamarin.Profiler ===

Version: 1.6.1
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Apple Developer Tools ===

Xcode 9.2 (13772)
Build 9C40b

=== Xamarin.Mac ===

Version: 4.2.1.29 (Visual Studio Community)

=== Xamarin.iOS ===

Version: 11.9.1.24 (Visual Studio Community)
Hash: f62de472
Branch: xcode9.3
Build date: 2018-03-29 19:30:53-0400

=== Xamarin.Android ===

Version: 8.2.0.16 (Visual Studio Community)
Android SDK: /Users/ralford/Library/Developer/Xamarin/android-sdk-macosx
Supported Android versions:
4.2 (API level 17)
4.4 (API level 19)
5.0 (API level 21)
5.1 (API level 22)
6.0 (API level 23)
7.0 (API level 24)
7.1 (API level 25)
8.0 (API level 26)
8.1 (API level 27)

SDK Tools Version: 26.1.1
SDK Platform Tools Version: 27.0.1
SDK Build Tools Version: 27.0.3

Java SDK: /usr
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Xamarin Inspector ===

Version: 1.4.0
Hash: b3f92f9
Branch: master
Build date: Fri, 19 Jan 2018 22:00:34 GMT
Client compatibility: 1

=== Build Information ===

Release ID: 704030010
Git revision: 5af3e98549653fcc5335896ccc296343d08f31bb
Build date: 2018-04-12 12:32:07-04
Xamarin addins: fadb82fb0fe2668cb7789f8b524aec6fb8568ee7
Build lane: monodevelop-lion-d15-6

=== Operating System ===

Mac OS X 10.12.6
Darwin 16.7.0 Darwin Kernel Version 16.7.0
Mon Nov 13 21:56:25 PST 2017
root:xnu-3789.72.11~1/RELEASE_X86_64 x86_64

=== Enabled user installed addins ===

Internet of Things (IoT) development (Preview) 7.1

Log File

Activity

  1. jonathanpeppers commented on May 16, 2018

    @jonathanpeppers
    Member

    So I'm able to repro on 15.7 stable with the sample project, here is the log of interest:

    Desugar
        Assembly = C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Build.Tasks.dll
        CommandLineArguments = C:\Program Files\Java\jdk1.8.0_161\\bin\java.exe -Xmx2G -jar "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\desugar_deploy.jar" --bootclasspath_entry "C:\Program Files (x86)\Android\android-sdk\platforms\android-26\android.jar" --min_sdk_version 21 --input obj\Debug\android\bin\classes --output obj\Debug\android\bin\desugared\__app_classes__.jar --input "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v8.0\mono.android.jar" --output obj\Debug\android\bin\desugared\77-62-E1-E3-1A-D6-EA-45-47-2E-9C-5C-61-78-9E-E7mono.android.jar --input "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\android-support-multidex.jar" --output obj\Debug\android\bin\desugared\2F-53-0B-D0-E6-E5-2A-6B-5A-6B-75-57-54-21-CF-8Fandroid-support-multidex.jar --input obj\Debug\lp\1\jl\domain-300.06-SNAPSHOT.jar --output obj\Debug\android\bin\desugared\DF-CE-93-F2-0E-90-E6-A7-70-3B-51-88-11-DD-CD-2Ddomain-300.06-SNAPSHOT.jar --input obj\Debug\lp\1\jl\__reference__reactive-streams-1.0.0.jar --output obj\Debug\android\bin\desugared\19-D5-F0-F4-3D-78-93-FC-C9-43-F5-B5-4A-00-AD-3D__reference__reactive-streams-1.0.0.jar --input obj\Debug\lp\1\jl\__reference__relinker.jar --output obj\Debug\android\bin\desugared\10-60-63-20-4B-35-75-2E-2D-11-E0-5D-1D-8E-FA-8A__reference__relinker.jar --input obj\Debug\lp\1\jl\__reference__rxjava-2.1.2.jar --output obj\Debug\android\bin\desugared\57-AA-40-5E-AA-41-DD-E4-9C-85-FC-E0-41-C7-F9-57__reference__rxjava-2.1.2.jar --input obj\Debug\lp\11\jl\bin\classes.jar --output obj\Debug\android\bin\desugared\FD-70-42-3A-EA-8A-B4-59-60-36-15-EF-BD-D4-F2-9Bclasses.jar --input obj\Debug\lp\13\jl\bin\classes.jar --output obj\Debug\android\bin\desugared\2A-7B-42-63-D3-6D-84-71-30-6C-F3-22-08-11-CA-E6classes.jar --input obj\Debug\lp\14\jl\bin\classes.jar --output obj\Debug\android\bin\desugared\CF-0C-BF-9D-32-8E-4D-42-BC-7C-E8-D8-BE-B4-4D-E9classes.jar --input obj\Debug\lp\15\jl\bin\classes.jar --output obj\Debug\android\bin\desugared\12-60-4C-C5-E0-34-5A-EE-57-A0-6A-E6-FC-4C-D0-73classes.jar --input obj\Debug\lp\16\jl\bin\classes.jar --output obj\Debug\android\bin\desugared\43-16-60-E0-50-3D-04-45-33-41-93-B6-C2-14-39-6Dclasses.jar --input obj\Debug\lp\17\jl\bin\classes.jar --output obj\Debug\android\bin\desugared\3B-61-87-37-4C-58-0A-5C-E8-3B-C3-68-8D-D1-AA-5Fclasses.jar --input obj\Debug\lp\18\jl\bin\classes.jar --output obj\Debug\android\bin\desugared\9C-48-94-B4-DC-79-7E-F6-FD-89-E3-8C-10-77-10-99classes.jar --input obj\Debug\lp\19\jl\bin\classes.jar --output obj\Debug\android\bin\desugared\04-5E-10-66-2D-35-4B-A6-DC-30-C2-B4-B4-66-4B-F3classes.jar --input obj\Debug\lp\20\jl\bin\classes.jar --output obj\Debug\android\bin\desugared\31-17-D5-8D-76-07-ED-09-CC-59-14-DE-78-4C-38-BBclasses.jar --input obj\Debug\lp\21\jl\bin\classes.jar --output obj\Debug\android\bin\desugared\55-B9-E2-70-65-E4-02-3D-B1-4F-84-A5-CB-60-5B-B5classes.jar --input obj\Debug\lp\22\jl\bin\classes.jar --output obj\Debug\android\bin\desugared\62-90-F1-87-76-DF-19-A8-9F-6F-B1-F5-7F-8C-5E-1Eclasses.jar --input obj\Debug\lp\23\jl\classes.jar --output obj\Debug\android\bin\desugared\F7-D7-E2-2E-12-15-E3-03-2A-07-81-5A-8C-F3-A5-19classes.jar --input obj\Debug\lp\24\jl\classes.jar --output obj\Debug\android\bin\desugared\63-E7-7F-E6-43-ED-01-E5-5B-47-18-D1-91-71-5F-F5classes.jar --input obj\Debug\lp\25\jl\classes.jar --output obj\Debug\android\bin\desugared\CC-86-6F-29-25-7D-77-D6-10-49-A9-2A-91-F8-48-BCclasses.jar --input obj\Debug\lp\26\jl\classes.jar --output obj\Debug\android\bin\desugared\C5-29-A1-37-E8-A8-CA-8B-3E-8C-24-DB-EA-10-93-6Bclasses.jar --input obj\Debug\lp\27\jl\classes.jar --output obj\Debug\android\bin\desugared\91-A0-68-0D-33-25-B8-8F-75-13-B3-67-80-27-5F-3Bclasses.jar 
        Parameters
            JavaPlatformJarPath = C:\Program Files (x86)\Android\android-sdk\platforms\android-26\android.jar
            DesugarJarPath = C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\desugar_deploy.jar
            ToolPath = C:\Program Files\Java\jdk1.8.0_161\\bin
            JavaMaximumHeapSize = 2G
            InputClassesDirectory = obj\Debug\android\bin\classes
            InputJars
                C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v8.0\mono.android.jar
                C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\android-support-multidex.jar
                obj\Debug\lp\1\jl\domain-300.06-SNAPSHOT.jar
                obj\Debug\lp\1\jl\__reference__reactive-streams-1.0.0.jar
                obj\Debug\lp\1\jl\__reference__relinker.jar
                obj\Debug\lp\1\jl\__reference__rxjava-2.1.2.jar
                obj\Debug\lp\11\jl\bin\classes.jar
                obj\Debug\lp\13\jl\bin\classes.jar
                obj\Debug\lp\14\jl\bin\classes.jar
                obj\Debug\lp\15\jl\bin\classes.jar
                obj\Debug\lp\16\jl\bin\classes.jar
                obj\Debug\lp\17\jl\bin\classes.jar
                obj\Debug\lp\18\jl\bin\classes.jar
                obj\Debug\lp\19\jl\bin\classes.jar
                obj\Debug\lp\20\jl\bin\classes.jar
                obj\Debug\lp\21\jl\bin\classes.jar
                obj\Debug\lp\22\jl\bin\classes.jar
                obj\Debug\lp\23\jl\classes.jar
                obj\Debug\lp\24\jl\classes.jar
                obj\Debug\lp\25\jl\classes.jar
                obj\Debug\lp\26\jl\classes.jar
                obj\Debug\lp\27\jl\classes.jar
            ManifestFile = obj\Debug\android\AndroidManifest.xml
            OutputDirectory = obj\Debug\android\bin\desugared
         Desugar Task
           JavaPlatformJarPath: 
           DesugarJarPath: 
           DesugarExtraArguments: 
           ManifestFile: 
           OutputDirectory: 
           InputClassesDirectory: 
           InputJars: 
             C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v8.0\mono.android.jar
             C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\android-support-multidex.jar
             obj\Debug\lp\1\jl\domain-300.06-SNAPSHOT.jar
             obj\Debug\lp\1\jl\__reference__reactive-streams-1.0.0.jar
             obj\Debug\lp\1\jl\__reference__relinker.jar
             obj\Debug\lp\1\jl\__reference__rxjava-2.1.2.jar
             obj\Debug\lp\11\jl\bin\classes.jar
             obj\Debug\lp\13\jl\bin\classes.jar
             obj\Debug\lp\14\jl\bin\classes.jar
             obj\Debug\lp\15\jl\bin\classes.jar
             obj\Debug\lp\16\jl\bin\classes.jar
             obj\Debug\lp\17\jl\bin\classes.jar
             obj\Debug\lp\18\jl\bin\classes.jar
             obj\Debug\lp\19\jl\bin\classes.jar
             obj\Debug\lp\20\jl\bin\classes.jar
             obj\Debug\lp\21\jl\bin\classes.jar
             obj\Debug\lp\22\jl\bin\classes.jar
             obj\Debug\lp\23\jl\classes.jar
             obj\Debug\lp\24\jl\classes.jar
             obj\Debug\lp\25\jl\classes.jar
             obj\Debug\lp\26\jl\classes.jar
             obj\Debug\lp\27\jl\classes.jar
           OutputJars: 
             obj\Debug\android\bin\desugared\77-62-E1-E3-1A-D6-EA-45-47-2E-9C-5C-61-78-9E-E7mono.android.jar
             obj\Debug\android\bin\desugared\2F-53-0B-D0-E6-E5-2A-6B-5A-6B-75-57-54-21-CF-8Fandroid-support-multidex.jar
             obj\Debug\android\bin\desugared\DF-CE-93-F2-0E-90-E6-A7-70-3B-51-88-11-DD-CD-2Ddomain-300.06-SNAPSHOT.jar
             obj\Debug\android\bin\desugared\19-D5-F0-F4-3D-78-93-FC-C9-43-F5-B5-4A-00-AD-3D__reference__reactive-streams-1.0.0.jar
             obj\Debug\android\bin\desugared\10-60-63-20-4B-35-75-2E-2D-11-E0-5D-1D-8E-FA-8A__reference__relinker.jar
             obj\Debug\android\bin\desugared\57-AA-40-5E-AA-41-DD-E4-9C-85-FC-E0-41-C7-F9-57__reference__rxjava-2.1.2.jar
             obj\Debug\android\bin\desugared\FD-70-42-3A-EA-8A-B4-59-60-36-15-EF-BD-D4-F2-9Bclasses.jar
             obj\Debug\android\bin\desugared\2A-7B-42-63-D3-6D-84-71-30-6C-F3-22-08-11-CA-E6classes.jar
             obj\Debug\android\bin\desugared\CF-0C-BF-9D-32-8E-4D-42-BC-7C-E8-D8-BE-B4-4D-E9classes.jar
             obj\Debug\android\bin\desugared\12-60-4C-C5-E0-34-5A-EE-57-A0-6A-E6-FC-4C-D0-73classes.jar
             obj\Debug\android\bin\desugared\43-16-60-E0-50-3D-04-45-33-41-93-B6-C2-14-39-6Dclasses.jar
             obj\Debug\android\bin\desugared\3B-61-87-37-4C-58-0A-5C-E8-3B-C3-68-8D-D1-AA-5Fclasses.jar
             obj\Debug\android\bin\desugared\9C-48-94-B4-DC-79-7E-F6-FD-89-E3-8C-10-77-10-99classes.jar
             obj\Debug\android\bin\desugared\04-5E-10-66-2D-35-4B-A6-DC-30-C2-B4-B4-66-4B-F3classes.jar
             obj\Debug\android\bin\desugared\31-17-D5-8D-76-07-ED-09-CC-59-14-DE-78-4C-38-BBclasses.jar
             obj\Debug\android\bin\desugared\55-B9-E2-70-65-E4-02-3D-B1-4F-84-A5-CB-60-5B-B5classes.jar
             obj\Debug\android\bin\desugared\62-90-F1-87-76-DF-19-A8-9F-6F-B1-F5-7F-8C-5E-1Eclasses.jar
             obj\Debug\android\bin\desugared\F7-D7-E2-2E-12-15-E3-03-2A-07-81-5A-8C-F3-A5-19classes.jar
             obj\Debug\android\bin\desugared\63-E7-7F-E6-43-ED-01-E5-5B-47-18-D1-91-71-5F-F5classes.jar
             obj\Debug\android\bin\desugared\CC-86-6F-29-25-7D-77-D6-10-49-A9-2A-91-F8-48-BCclasses.jar
             obj\Debug\android\bin\desugared\C5-29-A1-37-E8-A8-CA-8B-3E-8C-24-DB-EA-10-93-6Bclasses.jar
             obj\Debug\android\bin\desugared\91-A0-68-0D-33-25-B8-8F-75-13-B3-67-80-27-5F-3Bclasses.jar
         Exception in thread "main" java.lang.TypeNotPresentException: Type io.reactivex.functions.Action not present
         	at sun.invoke.util.BytecodeDescriptor.parseSig(BytecodeDescriptor.java:85)
         	at sun.invoke.util.BytecodeDescriptor.parseMethod(BytecodeDescriptor.java:63)
         	at sun.invoke.util.BytecodeDescriptor.parseMethod(BytecodeDescriptor.java:41)
         	at java.lang.invoke.MethodType.fromMethodDescriptorString(MethodType.java:1067)
         	at com.google.devtools.build.android.desugar.LambdaDesugaring$InvokedynamicRewriter.visitInvokeDynamicInsn(LambdaDesugaring.java:399)
         	at org.objectweb.asm.ClassReader.a(Unknown Source)
         	at org.objectweb.asm.ClassReader.b(Unknown Source)
         	at org.objectweb.asm.ClassReader.accept(Unknown Source)
         	at org.objectweb.asm.ClassReader.accept(Unknown Source)
         	at com.google.devtools.build.android.desugar.Desugar.desugarClassesInInput(Desugar.java:401)
         	at com.google.devtools.build.android.desugar.Desugar.desugarOneInput(Desugar.java:326)
         	at com.google.devtools.build.android.desugar.Desugar.desugar(Desugar.java:280)
         	at com.google.devtools.build.android.desugar.Desugar.main(Desugar.java:584)
         Caused by: java.lang.ClassNotFoundException: Class io.reactivex.functions.Action not found
         	at com.google.devtools.build.android.desugar.HeaderClassLoader.findClass(HeaderClassLoader.java:53)
         	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
         	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
         	at sun.invoke.util.BytecodeDescriptor.parseSig(BytecodeDescriptor.java:83)
         	... 12 more
        Errors
            C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2172,3): java.lang.TypeNotPresentException :  Type io.reactivex.functions.Action not present [C:\Users\myuser\Downloads\BindingTest\BindingTest\Sample.Android\Sample.Android.csproj]
        OutputItems
            _DesugaredJars
                obj\Debug\android\bin\desugared\77-62-E1-E3-1A-D6-EA-45-47-2E-9C-5C-61-78-9E-E7mono.android.jar
                obj\Debug\android\bin\desugared\2F-53-0B-D0-E6-E5-2A-6B-5A-6B-75-57-54-21-CF-8Fandroid-support-multidex.jar
                obj\Debug\android\bin\desugared\DF-CE-93-F2-0E-90-E6-A7-70-3B-51-88-11-DD-CD-2Ddomain-300.06-SNAPSHOT.jar
                obj\Debug\android\bin\desugared\19-D5-F0-F4-3D-78-93-FC-C9-43-F5-B5-4A-00-AD-3D__reference__reactive-streams-1.0.0.jar
                obj\Debug\android\bin\desugared\10-60-63-20-4B-35-75-2E-2D-11-E0-5D-1D-8E-FA-8A__reference__relinker.jar
                obj\Debug\android\bin\desugared\57-AA-40-5E-AA-41-DD-E4-9C-85-FC-E0-41-C7-F9-57__reference__rxjava-2.1.2.jar
                obj\Debug\android\bin\desugared\FD-70-42-3A-EA-8A-B4-59-60-36-15-EF-BD-D4-F2-9Bclasses.jar
                obj\Debug\android\bin\desugared\2A-7B-42-63-D3-6D-84-71-30-6C-F3-22-08-11-CA-E6classes.jar
                obj\Debug\android\bin\desugared\CF-0C-BF-9D-32-8E-4D-42-BC-7C-E8-D8-BE-B4-4D-E9classes.jar
                obj\Debug\android\bin\desugared\12-60-4C-C5-E0-34-5A-EE-57-A0-6A-E6-FC-4C-D0-73classes.jar
                obj\Debug\android\bin\desugared\43-16-60-E0-50-3D-04-45-33-41-93-B6-C2-14-39-6Dclasses.jar
                obj\Debug\android\bin\desugared\3B-61-87-37-4C-58-0A-5C-E8-3B-C3-68-8D-D1-AA-5Fclasses.jar
                obj\Debug\android\bin\desugared\9C-48-94-B4-DC-79-7E-F6-FD-89-E3-8C-10-77-10-99classes.jar
                obj\Debug\android\bin\desugared\04-5E-10-66-2D-35-4B-A6-DC-30-C2-B4-B4-66-4B-F3classes.jar
                obj\Debug\android\bin\desugared\31-17-D5-8D-76-07-ED-09-CC-59-14-DE-78-4C-38-BBclasses.jar
                obj\Debug\android\bin\desugared\55-B9-E2-70-65-E4-02-3D-B1-4F-84-A5-CB-60-5B-B5classes.jar
                obj\Debug\android\bin\desugared\62-90-F1-87-76-DF-19-A8-9F-6F-B1-F5-7F-8C-5E-1Eclasses.jar
                obj\Debug\android\bin\desugared\F7-D7-E2-2E-12-15-E3-03-2A-07-81-5A-8C-F3-A5-19classes.jar
                obj\Debug\android\bin\desugared\63-E7-7F-E6-43-ED-01-E5-5B-47-18-D1-91-71-5F-F5classes.jar
                obj\Debug\android\bin\desugared\CC-86-6F-29-25-7D-77-D6-10-49-A9-2A-91-F8-48-BCclasses.jar
                obj\Debug\android\bin\desugared\C5-29-A1-37-E8-A8-CA-8B-3E-8C-24-DB-EA-10-93-6Bclasses.jar
                obj\Debug\android\bin\desugared\91-A0-68-0D-33-25-B8-8F-75-13-B3-67-80-27-5F-3Bclasses.jar
    

    When I decompile obj\Debug\lp\1\jl\__reference__rxjava-2.1.2.jar, it appears to have the class it's complaining about:
    image

    @atsushieno do you see anything here?

  2. atsushieno commented on May 17, 2018

    @atsushieno
    Contributor

    Those Java libraries are included in the project as EmbeddedReferenceJar, which is wrong. If they have to be packaged in the apk, they have to be EmbeddedJar (for *.jar) and LibraryProjectZip (for *.aar) for each.

  3. atsushieno commented on May 17, 2018

    @atsushieno
    Contributor

    I was trying to get it working, with the command like:

    /usr/bin/java -Xmx2G -jar /devel/lib/xamarin.android/xbuild/Xamarin/Android/desugar_deploy.jar --bootclasspath_entry /home/atsushi/android-sdk-linux/platforms/android-27/android.jar --min_sdk_version 21 --input obj/Debug/android/bin/classes --output obj/Debug/android/bin/desugared/__app_classes__.jar --input /devel/lib/mono/xbuild-frameworks/MonoAndroid/v8.1/mono.android.jar --output obj/Debug/android/bin/desugared/1E-8B-99-7F-0F-D2-0E-E8-39-96-9C-83-1B-18-2C-BAmono.android.jar --input /devel/lib/xamarin.android/xbuild/Xamarin/Android/android-support-multidex.jar --output obj/Debug/android/bin/desugared/63-95-DA-C7-A0-FE-20-EB-AC-91-52-FE-AA-8E-1F-F6android-support-multidex.jar --input obj/Debug/lp/1/jl/__reference__reactive-streams-1.0.0.jar --output obj/Debug/android/bin/desugared/0C-CE-28-D3-EB-DC-7D-6D-24-AC-3E-17-44-3F-30-28__reference__reactive-streams-1.0.0.jar --input obj/Debug/lp/1/jl/__reference__relinker.jar --output obj/Debug/android/bin/desugared/53-2C-24-F2-36-B6-66-5A-F8-BA-E4-B0-08-F5-E2-22__reference__relinker.jar --input obj/Debug/lp/1/jl/__reference__rxjava-2.1.2.jar --output obj/Debug/android/bin/desugared/FC-94-20-F0-B4-73-7E-C4-35-86-DC-42-C2-BB-71-CA__reference__rxjava-2.1.2.jar --input obj/Debug/lp/1/jl/domain-300.06-SNAPSHOT.jar --output obj/Debug/android/bin/desugared/82-24-AA-F0-54-D8-2B-4D-2A-71-0B-A1-16-FC-80-FCdomain-300.06-SNAPSHOT.jar
    

    but even desugar_deploy.jar built from https://github.com/bazelbuild/bazel/tree/master/src/tools/android/java/com/google/devtools/build/android/desugar (build instruction can be found at https://github.com/webrtc-uwp/chromium-third_party/tree/master/bazel/desugar) results in the same.

    Removing the last two options make it pass, which means desugar fails to resolve those types in rxjava2 jars.

    At this state I can only think of issues in desugar itself.

  4. eclipsed4utoo commented on May 17, 2018

    @eclipsed4utoo
    Author

    @atsushieno Does this mean I need to report an issue with bazel instead?

    Thanks for looking into the issue.

  5. erikpowa commented on Sep 5, 2018

    @erikpowa
    Contributor

    @atsushieno it's XA sided bug see

  6. atsushieno commented on Sep 5, 2018

    @atsushieno
    Contributor

    (I believe either @jonathanpeppers or @dellis1972 works on those kind of issues nowadays after I left the team.)

  7. gmoney494 commented on Sep 11, 2018

    @gmoney494

    @jonathanpeppers @atsushieno
    I also have a similar issue but with a different class in the io.reactivex namespace. However, i ingest via the nuget package by Naxam. This suffices my dependency requirement for the native Aar im trying to bind.

    Any easy solution or workaround for the time being or do i have to wait for a new release?

  8. sgong-pdftron commented on May 29, 2019

    @sgong-pdftron

    Any update on this issue? Or workaround?

  9. jonathanpeppers commented on May 30, 2019

    @jonathanpeppers
    Member

    I retested this with VS 2019 16.1.1. I had to update Plugin.CurrentActivity to latest, not sure why.

    It looks like d8/r8 can handle the desugaring just fine now:

    > msbuild BindingTest.sln /p:AndroidDexTool=d8
    

    image

    You can add <AndroidDexTool>d8</AndroidDexTool> to your .csproj file.

    @eclipsed4utoo closing this for now. Let us know if d8 solves the problem for you!

  10. ghost locked as resolved and limited conversation to collaborators on Jun 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions