C#C
C#11mo ago
Thalnos

✅ Maui HelloWorld App

I have installed maui workload with dotnet workload install maui, then created a new solution in Rider for maui, and tried to run the windows launch profile. I got the error from the first screenshot. So I followed the link (screenshot 1) and copied and pasted dotnet build MauiTest.csproj -t:InstallAndroidDependencies -f net8.0-android -p:AndroidSdkDirectory=c:\work\android-sdk -p:JavaSdkDirectory=c:\work\jdk -p:AcceptAndroidSdkLicenses=True into a terminal to install the necessary dependencies for android.

It gave me a warning that "platform-tools" should have gotten installed but wasn't (screenshot 2), and suggested me a command to fix it. Upon executing that command it complained that JAVA_HOME env variable isn't set, which I have then set in both user and system env variables (screenshot 3), but after that it still says JAVA_HOME is not set (screenshot 2)
image.png
image.png
image.png
Was this page helpful?