From 944bce14b8898ceaeeabf42e7479578e61fed65c Mon Sep 17 00:00:00 2001 From: tenzap Date: Sun, 4 Dec 2022 15:14:23 +0100 Subject: [PATCH] [Build Fix] set AndroidClassParser build property to class-parse Build reported these warnings: warning XA4231: The Android class parser value 'jar2xml' is deprecated and will be removed in a future version of Xamarin.Android. Update the project properties to use 'class-parse' In the code is not specified, so by default it uses 'jar2xml'. So set its value to 'class-parse'. See: https://github.com/xamarin/xamarin-android/blob/main/Documentation/guides/messages/xa4231.md https://github.com/xamarin/xamarin-android/issues/1319 Moving to class-parse instead of jar2xml also fixes issues when building with Java 11 & Xamarin < 12.2 Because of: - https://github.com/xamarin/xamarin-android/commit/94e21c7aaa8d5eb51e0e2234cd24d607515b0064 If the change wasn't done, we would have to stick with JDK-8 --- src/AndroidFileChooserBinding/AndroidFileChooserBinding.csproj | 3 ++- src/KP2AKdbLibraryBinding/KP2AKdbLibraryBinding.csproj | 3 ++- src/Kp2aKeyboardBinding/Kp2aKeyboardBinding.csproj | 3 ++- src/PCloudBindings/PCloudBindings.csproj | 3 ++- src/PluginSdkBinding/PluginSdkBinding.csproj | 3 ++- src/build.readme.md | 1 - 6 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/AndroidFileChooserBinding/AndroidFileChooserBinding.csproj b/src/AndroidFileChooserBinding/AndroidFileChooserBinding.csproj index 4e617c68..6c4f56fc 100644 --- a/src/AndroidFileChooserBinding/AndroidFileChooserBinding.csproj +++ b/src/AndroidFileChooserBinding/AndroidFileChooserBinding.csproj @@ -13,6 +13,7 @@ v8.0 false XAJavaInterop1 + class-parse true @@ -79,4 +80,4 @@ False - \ No newline at end of file + diff --git a/src/KP2AKdbLibraryBinding/KP2AKdbLibraryBinding.csproj b/src/KP2AKdbLibraryBinding/KP2AKdbLibraryBinding.csproj index 54426a2c..404c3eb5 100644 --- a/src/KP2AKdbLibraryBinding/KP2AKdbLibraryBinding.csproj +++ b/src/KP2AKdbLibraryBinding/KP2AKdbLibraryBinding.csproj @@ -13,6 +13,7 @@ v8.0 false XAJavaInterop1 + class-parse true @@ -77,4 +78,4 @@ --> - \ No newline at end of file + diff --git a/src/Kp2aKeyboardBinding/Kp2aKeyboardBinding.csproj b/src/Kp2aKeyboardBinding/Kp2aKeyboardBinding.csproj index bac62e95..869dcc35 100644 --- a/src/Kp2aKeyboardBinding/Kp2aKeyboardBinding.csproj +++ b/src/Kp2aKeyboardBinding/Kp2aKeyboardBinding.csproj @@ -13,6 +13,7 @@ false v10.0 XAJavaInterop1 + class-parse True @@ -68,4 +69,4 @@ - \ No newline at end of file + diff --git a/src/PCloudBindings/PCloudBindings.csproj b/src/PCloudBindings/PCloudBindings.csproj index f34a76de..d3518054 100644 --- a/src/PCloudBindings/PCloudBindings.csproj +++ b/src/PCloudBindings/PCloudBindings.csproj @@ -13,6 +13,7 @@ false v8.0 XAJavaInterop1 + class-parse true @@ -73,4 +74,4 @@ - \ No newline at end of file + diff --git a/src/PluginSdkBinding/PluginSdkBinding.csproj b/src/PluginSdkBinding/PluginSdkBinding.csproj index 905c8688..11a089fb 100644 --- a/src/PluginSdkBinding/PluginSdkBinding.csproj +++ b/src/PluginSdkBinding/PluginSdkBinding.csproj @@ -13,6 +13,7 @@ false v8.0 XAJavaInterop1 + class-parse true @@ -73,4 +74,4 @@ --> - \ No newline at end of file + diff --git a/src/build.readme.md b/src/build.readme.md index 5e7efa02..f62129c7 100644 --- a/src/build.readme.md +++ b/src/build.readme.md @@ -44,7 +44,6 @@ build-java.bat will call gradlew for several Java modules. build-xamarin.bat wil - Add `xabuild` to your path: `export PATH=/path/to/xamarin.android-oss/bin/Release/bin/:$PATH` - Setup your `ANDROID_HOME` if it's not already: `export ANDROID_HOME=/path/to/android/` - Alternatively, you can set your `ANDROID_SDK_PATH` and `ANDROID_NDK_PATH`. -- Build [jar2xml](https://github.com/xamarin/jar2xml) and copy `jar2xml.jar` to `/path/to/xamarin.android-oss/bin/Release/lib/xamarin.android/xbuild/Xamarin/Android/` - Install [libzip](https://libzip.org/) for your distribution. - Note: Xamarin seems to require `libzip4`, yet most distributions only ships `libzip5`. As a dirty workaround, it's possible to symlink `libzip.so.5` to `libzip.so.4`. Luckily, it appears to be working. - `sudo ln -s /usr/lib/libzip.so.5 /usr/lib/libzip.so.4`