Spoiler: I was able to build and run my previous work PCL project and use Visual Studio Code on Linux again.
I had a strange "Native Crash" error during the build
but I retried the build and it works.
* Assertion at metadata.c:1035, condition `index < meta->heap_strings.size' not met
=================================================================
Native Crash Reporting
=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
=================================================================
Managed Stacktrace:
=================================================================
at <unknown> <0xffffffff>
at System.Reflection.Assembly:InternalGetAssemblyName <0x000ba>
at System.Reflection.AssemblyName:GetAssemblyName <0x00097>
at Xamarin.Build.Download.BaseXamarinBuildResourceRestore:FindMatchingAssembly <0x000f2>
at Xamarin.Build.Download.XamarinBuildAndroidAarProguardConfigs:Execute <0x002df>
Environment:
but I retried the build and it works.
* Assertion at metadata.c:1035, condition `index < meta->heap_strings.size' not met
=================================================================
Native Crash Reporting
=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
=================================================================
Managed Stacktrace:
=================================================================
at <unknown> <0xffffffff>
at System.Reflection.Assembly:InternalGetAssemblyName <0x000ba>
at System.Reflection.AssemblyName:GetAssemblyName <0x00097>
at Xamarin.Build.Download.BaseXamarinBuildResourceRestore:FindMatchingAssembly <0x000f2>
at Xamarin.Build.Download.XamarinBuildAndroidAarProguardConfigs:Execute <0x002df>
Environment:
Debian Stretch
openjdk 8 doesn't work for me, so I using openjdk 11.0.2 (don't forget to export JAVA_HOME=... in .bashrc)
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/android/apksigner/ApkSignerTool has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0
openjdk 11.0.2 from https://jdk.java.net/archive/ (not 11.0.6 from backports !!!), otherwise I have an error:
Found Java SDK version 11.0.6.
/usr/lib/mono/xbuild/Xamarin/Android/Xamarin.Android.Legacy.targets(172,5): error XA0030: Building with JDK version `11.0.6` is not supported. Please install JDK version `11.0.4`. See https://aka.ms/xamarin/jdk9-errors
https://dev.azure.com/xamarin/public/_build/results?buildId=21214
https://dev.azure.com/xamarin/public/_build/results?buildId=21214&view=artifacts&type=publishedArtifacts
https://dev.azure.com/xamarin/public/_build/results?buildId=21214&view=artifacts&type=publishedArtifacts
(download Linux artifacts :: Linux Packages :: debian package)
Mono JIT compiler version 6.8.0.123 (tarball Tue May 12 15:15:47 UTC 2020)
Mono JIT compiler version 6.10.0.104 (tarball Fri Jun 26 19:34:40 UTC 2020) also works for me (occasionally updated from Debian Stretch backports)
msbuild Microsoft (R) Build Engine version 16.5.0-ci for Mono
NuGet Version: 5.5.0.6382
Don't forget to use:
<AndroidLinkMode>None</AndroidLinkMode>
<AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
<EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk>
<AndroidSupportedAbis>x86_64,x86,armeabi-v7a</AndroidSupportedAbis>
<AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
<EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk>
<AndroidSupportedAbis>x86_64,x86,armeabi-v7a</AndroidSupportedAbis>
P.S. Interesting document (explains why only new fast.sh works for the override path /data/user/0/com.my.application/files/.__override__ ):
P.P.S. Please use /data/local/tmp instead of /sdcard/Download in fast.sh
Немає коментарів:
Дописати коментар