-
Notifications
You must be signed in to change notification settings - Fork 555
Description
Android application type
Android for .NET (net6.0-android, etc.)
Affected platform version
VS4Mac 2022 Preview (17.0 build 8904), .NET 6.0.300, Xamarin.Android 12.3.0.3
Description
I have been trying to use net6.0-android as the target framework to build a WearOS wearable app after it was mentioned in an (unofficial) .NET MAUI Platforms Support gist that it was supported.
The warnings below seem to indicate android-31/optional/com.google.android.wearable.jar
is missing when in actual fact com.google.android.wearable.jar
does not exist in android-30/optional/
and android-28/optional/
which are the other folders I have there.
I am unsure if those warnings relate to the R8 compilation or not.
Repro:
WearOSMonoTest.zip
WearOSNet6Test.zip
Extra info:
I did update target framework on the first project to MonoAndroid12.0
I also updated TargetFramework
to net6.0-android31
because that is what was listed as the required framework on nuget.org for the nugets I added but I don't believe this is required as it has the same issues if I use net6.0-android.
Steps to Reproduce
- Create new wear app using VS4Mac stable (in this case I called it WearOSMonoTest)
- Update all nuget files.
- Build and deploy app to confirm it is working.
- (see WearOSMonoTest.zip above)
- Create new net6.0-android app,
dotnet new android --name WearOSNet6Test
- Update nugets/resources/code to match the
WearOSMonoTest
project. - Build and deploy app to see .NET 6 in a WearOS app.
- Get compile issues (listed below)
- (see WearOSNet6Test.zip above)
Did you find any workaround?
Nope.
Relevant log output
obj/Debug/net6.0-android31/android/AndroidManifest.xml : warning XA4218: Unable to find //manifest/application/uses-library at path: /Users/bradmoore/Library/Developer/Xamarin/android-sdk-macosx/platforms/android-31/optional/com.google.android.wearable.jar
obj/Debug/net6.0-android31/android/AndroidManifest.xml : warning XA4218: Unable to find //manifest/application/uses-library at path: /Users/bradmoore/Library/Developer/Xamarin/android-sdk-macosx/platforms/android-31/optional/androidx.window.extensions.jar
obj/Debug/net6.0-android31/android/AndroidManifest.xml : warning XA4218: Unable to find //manifest/application/uses-library at path: /Users/bradmoore/Library/Developer/Xamarin/android-sdk-macosx/platforms/android-31/optional/androidx.window.sidecar.jar
/usr/local/share/dotnet/packs/Microsoft.Android.Sdk.Darwin/32.0.300-rc.3.45/tools/Xamarin.Android.D8.targets(79,5): error : java.lang.RuntimeException: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: obj/Debug/net6.0-android31/lp/59/jl/classes.jar : android/support/v4/app/INotificationSideChannel$Stub.class