Repository navigation
"Error while processing" errors in BindingsGenerator task of ExportJarToXml target. #3291
Description
Steps to Reproduce
I'm getting a few message errors that are not causing bindings build as failed:
Error while processing '[Method] java.time.temporal.Temporal adjustInto(java.time.temporal.Temporal temporal, long newValue)' in '[Class] java.time.temporal.ChronoField': Type 'java.time.temporal.Temporal' was not found.
Error while processing '[Method] java.time.temporal.Temporal addTo(java.time.temporal.Temporal temporal, long amount)' in '[Class] java.time.temporal.ChronoUnit': Type 'java.time.temporal.Temporal' was not found.
Error while processing type '[Class] X': Type 'Y' was not found.
Those errors are probably only related to ExportJarToXml phase because those errors are not travelling to the GenerateBindings target. It cannot be adjusted by transforms as ExportJarToXml/BindingsGenerator TransformFiles property is empty.
It seems that BindingsGenerator behaves differently for those two targets - probably to OnlyRunXmlAdjuster property true/false difference.
Expected Behavior
Build without error messages.
Actual Behavior
Error messages present.
Version Information
=== Visual Studio Enterprise 2019 for Mac ===
Version 8.1.2 (build 2)
Installation UUID: fc295dbb-ea60-45ea-a7bd-051b091fe655
GTK+ 2.24.23 (Raleigh theme)
Xamarin.Mac 5.6.0.25 (d16-0 / 50f75273)
Package version: 518010028
=== Mono Framework MDK ===
Runtime:
Mono 5.18.1.28 (2018-08/223ea7ef92e) (64-bit)
Package version: 518010028
=== NuGet ===
Version: 5.0.2.5988
=== .NET Core ===
Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
2.1.11
2.1.9
2.1.8
2.1.7
2.1.2
2.1.1
2.0.5
2.0.0
1.1.1
1.0.4
SDK: /usr/local/share/dotnet/sdk/2.1.700/Sdks
SDK Versions:
2.1.700
2.1.505
2.1.504
2.1.503
2.1.302
2.1.301
2.1.4
2.0.0
1.0.3
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.18.1/lib/mono/msbuild/Current/bin/Sdks
=== Xamarin.Profiler ===
Version: 1.6.10
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler
=== Updater ===
Version: 11
=== Apple Developer Tools ===
Xcode 10.2.1 (14490.122)
Build 10E1001
=== Xamarin.Mac ===
Version: 5.10.0.157 (Visual Studio Enterprise)
Hash: 6bd94753
Branch: d16-1
Build date: 2019-06-12 17:28:48-0400
=== Xamarin.iOS ===
Version: 12.10.0.157 (Visual Studio Enterprise)
Hash: 6bd94753
Branch: d16-1
Build date: 2019-06-12 17:28:47-0400
=== Xamarin Designer ===
Version: 16.1.0.467
Hash: f1657e133
Branch: remotes/origin/d16-1-new-document-model
Build date: 2019-06-18 21:57:42 UTC
=== Xamarin.Android ===
Version: 9.3.0.23 (Visual Studio Enterprise)
Commit: HEAD/d0b48056f
Android SDK: /Users/mwesolowski/Library/Developer/Xamarin/android-sdk-macosx
Supported Android versions:
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: 29.0.1
SDK Build Tools Version: 28.0.3
Build Information:
Mono: mono/mono@3a07bd426d3
Java.Interop: xamarin/java.interop/d16-1@5ddc3e3
LibZipSharp: grendello/LibZipSharp/d16-1@44de300
LibZip: nih-at/libzip@b95cf3f
ProGuard: xamarin/proguard@905836d
SQLite: xamarin/sqlite@8212a2d
Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-1@acabd26
=== Microsoft Mobile OpenJDK ===
Java SDK: /Users/mwesolowski/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_8.0.25
1.8.0-25
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL
=== Android Device Manager ===
Version: 1.2.0.44
Hash: aac645b
Branch: remotes/origin/d16-1
Build date: 2019-05-29 19:55:24 UTC
=== Xamarin Inspector ===
Version: 1.4.3
Hash: db27525
Branch: 1.4-release
Build date: Mon, 09 Jul 2018 21:20:18 GMT
Client compatibility: 1
=== Build Information ===
Release ID: 801020002
Git revision: 5d9e30e11e16dbb655977e4f7051ffedd3de9f94
Build date: 2019-06-24 20:05:44+00
Build branch: release-8.1
Xamarin extensions: 5104b76623e0df8e5f763f87d170279c0b788e89
=== Operating System ===
Mac OS X 10.14.5
Darwin 18.6.0 Darwin Kernel Version 18.6.0
Thu Apr 25 23:16:27 PDT 2019
root:xnu-4903.261.4~2/RELEASE_X86_64 x86_64
Activity
jpobst commentedon Jul 5, 2019
There is some information on this error here: https://stackoverflow.com/questions/51128130/xamarin-android-binding-generation-giving-type-x-was-not-found-errors-for-clas
Sounds like you can try adding
<AndroidEnableDesugar>true</AndroidEnableDesugar>or<AndroidDexTool>dx</AndroidDexTool>to your.csprojand see if that helps.If not, is the library you are trying to bind public? Can you provide it or your MSBuild log for us to look at? (Getting diagnostic log)
jpobst commentedon Aug 23, 2019
Closing due to lack of info. If you are still encountering this and can provide a log, feel free to re-open.
estebanhiguitad commentedon Jul 22, 2021
I am trying to create a Xamarin Binding Library from an .aar. I created a simple android studio project with a one simple activity and build .aar file. After it go to rider with jetbrains xamarin sdk version 11.2.0.21 and create an empty Binding library and add my .aar with LibraryProjectZip as build action. Also add .aar dependencies and compile it. Into debug console I get this error:
I added to my .csproj this line to enable java 8 features, but does not work.
d8
NOTES:
I share a simple project for it
https://github.com/estebanhiguitad/XamarinBindingApplication
I need support those API versions in my project, from 21 to 30.
I share this issue to rider team, leave link:
https://youtrack.jetbrains.com/issue/RIDER-65476