dotnet / android

.NET for Android provides open-source bindings of the Android SDK for use with .NET managed languages such as C#
MIT License
1.93k stars 528 forks source link

The "MonoAOTCompiler" task was not given a value for the required parameter "CompilerBinaryPath" #6936

Open Juriyx opened 2 years ago

Juriyx commented 2 years ago

Android application type

Android for .NET (net6.0-android, etc.)

Affected platform version

VS 17.2.0 Preview 3.0, .NET 6.0.300-preview.22204.3

Description

When building .NET 6 Android app in the configuration Release, I get this error: The "MonoAOTCompiler" task was not given a value for the required parameter "CompilerBinaryPath".

Steps to Reproduce

  1. Use the app from my repository.
  2. Build the Samples.Mobile project in Release configuration.

Did you find any workaround?

No

Relevant log output

Samples.Mobile_Release_AnyCPU_Build_2022-04-18T17_41_51.3124603+03_00.binlog.zip

jonathanpeppers commented 2 years ago

@Juriyx are you setting the $(RuntimeIdentifer) to android.21-arm?

I'd recommend removing .21 for now, as that seems to be what causes this problem.

Juriyx commented 2 years ago

I'd recommend removing .21 for now, as that seems to be what causes this problem.

Thanks, it worked. But two warnings left. What does this mean? obj\Release\net6.0-android\android\AndroidManifest.xml : warning XA4218: Unable to find //manifest/application/uses-library at path: C:\Program Files (x86)\Android\android-sdk\platforms\android-31\optional\androidx.window.extensions.jar obj\Release\net6.0-android\android\AndroidManifest.xml : warning XA4218: Unable to find //manifest/application/uses-library at path: C:\Program Files (x86)\Android\android-sdk\platforms\android-31\optional\androidx.window.sidecar.jar

jonathanpeppers commented 2 years ago

I would ignore those for now, this is tracked in: https://github.com/xamarin/xamarin-android/issues/6809

Juriyx commented 2 years ago

I would ignore those for now, this is tracked in: #6809

Understood

jonathanpeppers commented 2 years ago

I'm going to keep this open, as we should eventually get android.21-arm to work.

Juriyx commented 2 years ago

as we should eventually get android.21-arm to work.

Ok 😉