I set up Fedora Linux with the KDE desktop environment and installed Rider. I also downloaded the necessary templates and plugins. After that, I created a cross-platform Avalonia UI app in Rider, but the Android and iOS parts of the app are throwing compilation errors. I've had this issue before on Windows 11, but back then, I just installed MAUI, and everything worked fine. On Linux, though, MAUI isn't available, so I decided to set up the Android SDK and a virtual Android device using Android Studio.
I downloaded Android Studio, and everything works perfectly there — the emulator runs, and Kotlin apps work without any issues. I thought this would fix the problem in Rider too, but now I'm getting a different error.
Here's what it says:
Microsoft.NET.TargetFrameworkInference.targets(117, 5): [NETSDK1139] The target platform identifier 'android' was not recognized.
When I click on the error, it takes me to the Microsoft.NET.TargetFrameworkInference.targets
file and shows this code:
<NETSdkError Condition="'$(TargetPlatformSupported)' != 'true' and '$(UseWorkloadsSpecificError)' != 'true'"
ResourceName="UnsupportedTargetPlatformIdentifier"
FormatArguments="$(TargetPlatformIdentifier)" />
<NETSdkError Condition="'$(TargetPlatformSupported)' != 'true' and '$(UseWorkloadsSpecificError)' == 'true'"
ResourceName="UnsupportedTargetPlatformIdentifierWithWorkloadsDisabled"
FormatArguments="$(TargetPlatformIdentifier)" />
I also tried installing the Android workload using the following command in the terminal:
dotnet workload install android
But I got this error:
Workload installation failed: Workload ID 'android' is not recognized.
By the way, I’m using .NET 9. I’m not sure what to do about this. Any ideas?