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
- Build the attached solution
- 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
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 presentThe 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
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)
=== 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