Replies: 5 comments 11 replies
-
Which Linux distribution/version are you running on? The Microsoft.Maui.Resizetizer.Sdk issue is basically an issue in https://github.com/mono/SkiaSharp. @mattleibow p/invoking into The recommended alternative is using the NativeLibrary.Load API. If that doesn't work then you could do what pythonnet did, try p/invoking to |
Beta Was this translation helpful? Give feedback.
-
Found a small workaround, just type |
Beta Was this translation helpful? Give feedback.
-
I don't see
I am trying to compile in Linux, targeting Is this supposed to work? If not, is Windows/MacOS the only solution for CI/CD automation? |
Beta Was this translation helpful? Give feedback.
-
I've been using MAUI + .NET 7.0 SDK since November on my Debian 11 machine, and it's worked almost out of the box. I probably had the right prerequisites set-up already, because the machine was used for Xamarin Forms development prior to that. I only ran into the very first issue. The default targetting of both Android and iOS won't work. I changed the line to: <TargetFrameworks>net7.0-android</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('OSX'))">net7.0-ios</TargetFrameworks> We're building in Github Actions CI and that works both for Android on Linux and iOS on MacOS. Have a look at our company's DockerFile if you're having trouble setting up your toolchain on Linux As you can see, installing MAUI is only one command. Of course there are some prerequisites that you need anyway when you're doing Android and/or C# development on Linux, and there are some specifics that can trip you up. For example, I think you need Java 11 instead of 17. |
Beta Was this translation helpful? Give feedback.
-
I created an issue for this: #16146. |
Beta Was this translation helpful? Give feedback.
-
I noticed the following workloads available in Linux:
After installing them I thought that would enable me to work for Linux but I get an error when I compile a
dotnet new maui
app and settingexport AndroidSdkDirectory=$HOME/Android/Sdk
the correct directory.I modified the
csproj
to only have this framework as target:I run it with this command:
dotnet build -t:Run -f net6.0-android
and I get this error:Setting up
export LD_DEBUG=libs
we find this error:The error: https://docs.microsoft.com/en-us/xamarin/android/errors-and-warnings/xa0111
Looks like Maui is calling the
aapt2
tool (which I really don't know what it is), incorrectly to ask for version.while
aapt2 version
works...I also read a thread on
xamarin-android
that removing all the Icons would make it work, making my final csproj like this:but I still got this error:
After going to the
AndroidManifest.xml
and removing the icons from this line:Like this:
Now I'm able to build with:
Run the emulator from the terminal:
And the app itself

dotnet build -t:Run -f net6.0-android
:Beta Was this translation helpful? Give feedback.
All reactions