dotnet / dotnet/android-libraries
Xamarin.AndroidX.Compose.Runtime.Annotation.Android and Xamarin.AndroidX.SavedState.SavedState.Compose incorrectly include .aar files as AndroidJavaLibrary instead of AndroidAarLibrary in .targets files
- Dominant language
- C#
- Stars
- 317
- Forks
- 73
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 17
Description
### Android framework version
net10.0-android
### Affected platform version
net10.0
### Description
The .targets files shipped in both build/ and buildTransitive/ for this package include the file aar/runtime-annotation-android.aar using the AndroidJavaLibrary MSBuild item type:
build/net10.0-android36.0/Xamarin.AndroidX.Compose.Runtime.Annotation.Android.targets
```
```
AndroidJavaLibrary is intended for .jar files. The correct item type for .aar files is AndroidAarLibrary. Using AndroidJavaLibrary for an .aar causes any tools that iterate over that item list expecting plain Java bytecode to fail, and silently drops any resources, AndroidManifest.xml entries, and native libs contained in the AAR.
Xamarin.AndroidX.SavedState.SavedState.Compose has the same issue.
### Steps to Reproduce
Just look into package
https://nuget.info/packages/Xamarin.AndroidX.SavedState.SavedState.Compose/1.4.0.2
Check build/net10.0-android36.0/Xamarin.AndroidX.SavedState.SavedState.Compose.targets
https://nuget.info/packages/Xamarin.AndroidX.Compose.Runtime.Annotation.Android/1.10.4.1
Check build/net10.0-android36.0/Xamarin.AndroidX.Compose.Runtime.Annotation.Android.targets
### Did you find any workaround?
```
```
### Relevant log output
```shell
```
Contributor guide
Assessment
This issue has not been assessed yet.