Closed rene-descartes2021 closed 8 months ago
I think .NET Android will be supported on linux-arm64
in .NET 9, but isn't supported on .NET 8:
https://github.com/xamarin/xamarin-android/pull/8500
You could try the .NET 9 preview and see if that works.
Actually we have this change in the latest service release: https://github.com/xamarin/xamarin-android/releases/tag/34.0.79
Does dotnet workload install android --verbosity diag
show the version of the android
workload? 34.0.79 should have #8500 in it.
Oh wow, lucky me, I had no idea this was a new feature. I'm fine waiting a bit.
Does
dotnet workload install android --verbosity diag
show the version of theandroid
workload? 34.0.79 should have #8500 in it.
--verbosity diag
doesn't print anything additional in my case. No other parameter or environmental variable I tried changed anything. So I started searching the files/manifests.
I noticed indication of the prior version being in the filesystem, and looking at 34.0.43 files I see it doesn't have linux-arm64 while 34.0.79 does.
~/.dotnet/sdk-manifests/8.0.100/microsoft.net.sdk.android$ ls
34.0.43 34.0.79
So I grep'd around for 34.0.43 and found this "baseline" manifest:
~/.dotnet/sdk-manifests/8.0.100/workloadsets/8.0.201-baseline.24114.5$ head baseline.workloadset.json
{
"Microsoft.NET.Sdk.Android": "34.0.43/8.0.100",
"Microsoft.NET.Sdk.iOS": "17.0.8478/8.0.100",
"Microsoft.NET.Sdk.MacCatalyst": "17.0.8478/8.0.100",
"Microsoft.NET.Sdk.macOS": "14.0.8478/8.0.100",
"Microsoft.NET.Sdk.Maui": "8.0.3/8.0.100",
"Microsoft.NET.Sdk.tvOS": "17.0.8478/8.0.100",
"Microsoft.NET.Workload.Mono.ToolChain.Current": "8.0.2/8.0.100",
So, maybe that is where the problem area is, that it's looking at the available architectures in the baseline version and not the most recent available?
Well, I'm fine waiting for the baseline to advance to 34.0.79, so I'll close this issue and will reopen if there is still problem then. Thank you!
It seems like if you did dotnet workload update --verbosity diag
, it should update the contents of this file:
dotnet/sdk-manifests/microsoft.net.sdk.android/8.0.100/WorkloadManifest.json
And this file should change to 34.0.79, or the latest version. Does it not?
dotnet/sdk-manifests/microsoft.net.sdk.android/8.0.100/WorkloadManifest.json
And this file should change to 34.0.79, or the latest version. Does it not?
I don't see that particular path, it's different on my system:
$ ls -l ~/.dotnet/sdk-manifests/
total 4
drwxr-xr-x. 16 user users 3452 Feb 14 18:25 8.0.100
Here are a few similar paths I see.
WorkloadManifest.json under sdk-advertising:
$ head -n 20 ~/.dotnet/sdk-advertising/8.0.200/microsoft.net.sdk.android/WorkloadManifest.json
{
"version": "34.0.79",
"workloads": {
"android": {
"description": ".NET SDK Workload for building Android applications.",
"packs": [
"Microsoft.Android.Sdk.net8",
"Microsoft.Android.Sdk.net7",
"Microsoft.Android.Ref.34",
"Microsoft.Android.Runtime.34.android-arm",
"Microsoft.Android.Runtime.34.android-arm64",
"Microsoft.Android.Runtime.34.android-x86",
"Microsoft.Android.Runtime.34.android-x64",
"Microsoft.Android.Templates"
],
"platforms": [ "win-x64", "win-arm64", "linux-x64", "linux-arm64", "osx-x64", "osx-arm64" ],
"extends" : [
"microsoft-net-runtime-android-net7",
"microsoft-net-runtime-android-aot-net7",
"microsoft-net-runtime-android",
Two versions of WorkloadManifest.json under sdk-manifests, the latter with linux-arm64:
~$ head -n 20 ~/.dotnet/sdk-manifests/8.0.100/microsoft.net.sdk.android/34.0.43/WorkloadManifest.json
{
"version": "34.0.43",
"workloads": {
"android": {
"description": ".NET SDK Workload for building Android applications.",
"packs": [
"Microsoft.Android.Sdk.net8",
"Microsoft.Android.Sdk.net7",
"Microsoft.Android.Ref.34",
"Microsoft.Android.Runtime.34.android-arm",
"Microsoft.Android.Runtime.34.android-arm64",
"Microsoft.Android.Runtime.34.android-x86",
"Microsoft.Android.Runtime.34.android-x64",
"Microsoft.Android.Templates"
],
"platforms": [ "win-x64", "win-arm64", "linux-x64", "osx-x64", "osx-arm64" ],
"extends" : [
"microsoft-net-runtime-android-net7",
"microsoft-net-runtime-android-aot-net7",
"microsoft-net-runtime-android",
$ head -n 20 ~/.dotnet/sdk-manifests/8.0.100/microsoft.net.sdk.android/34.0.79/WorkloadManifest.json
{
"version": "34.0.79",
"workloads": {
"android": {
"description": ".NET SDK Workload for building Android applications.",
"packs": [
"Microsoft.Android.Sdk.net8",
"Microsoft.Android.Sdk.net7",
"Microsoft.Android.Ref.34",
"Microsoft.Android.Runtime.34.android-arm",
"Microsoft.Android.Runtime.34.android-arm64",
"Microsoft.Android.Runtime.34.android-x86",
"Microsoft.Android.Runtime.34.android-x64",
"Microsoft.Android.Templates"
],
"platforms": [ "win-x64", "win-arm64", "linux-x64", "linux-arm64", "osx-x64", "osx-arm64" ],
"extends" : [
"microsoft-net-runtime-android-net7",
"microsoft-net-runtime-android-aot-net7",
"microsoft-net-runtime-android",
Android application type
.NET Android (net7.0-android, net8.0-android, etc.)
Affected platform version
.NET 8.0.201
Description
android
andmaui-android
workloads are not listed indotnet workload search
. At this time I'd like to use theandroid
workload and I assume it's in this repository. First time attempting something like this so I could be doing something wrong./home/user/.dotnet/sdk/8.0.201/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.ImportWorkloads.targets(38,5): error NETSDK1178: You may need to build the project on another operating system or architecture, or update the .NET SDK
In my readings I see
android
workload available on other's Linux OS with .NET 8, so I presume the arm64 host architecture is the issue. Or some other unknown. I can see it on my Linux OS desktop (x86_64) with .NET 7.If not supported on Arm64 I'd appreciate any tips on the problem area to look, in order to possibly contribute.
Steps to Reproduce
Reproduction steps:
Did you find any workaround?
No response
Relevant log output
How I installed dotnet SDK:
Previously I tried 8.0.101 and that didn't work so I updated to 8.0.201 with same results.