tuyen-vuduc / mapbox-maui

Mapbox library for MAUI
Other
35 stars 6 forks source link

dot net 8 Android build error - "Malformed inner-class attribute" #8

Closed blackchalk closed 4 months ago

blackchalk commented 4 months ago

I am trying to build .Net Android, when I download the Com.Mapbox.Android i get a build error

TargetFramework: net8.0-android

nuget:

 Xamarin.AndroidX.Annotation Version="1.6.0.4```

As instructed from the blog. Clean & Rebuild, same. Anyone experienced this?

``` Error JAVA0000: Info in obj/Debug/net8.0-android/lp/151/jl/classes.jar:com/mapbox/maps/plugin/annotation/generated/CircleAnnotationManager$special$$inlined$silentUnwrap$4$wm$TypeUtilsKt$WhenMappings.class:
Malformed inner-class attribute:
    outerTypeInternal: com/mapbox/maps/extension/style/utils/TypeUtilsKt
    innerTypeInternal: com/mapbox/maps/plugin/annotation/generated/CircleAnnotationManager$special$$inlined$silentUnwrap$4$wm$TypeUtilsKt$WhenMappings
    innerName: WhenMappings
Info in obj/Debug/net8.0-android/lp/151/jl/classes.jar:com/mapbox/maps/plugin/annotation/generated/CircleAnnotationManager$special$$inlined$silentUnwrap$1$wm$TypeUtilsKt$WhenMappings.class:
Malformed inner-class attribute:
    outerTypeInternal: com/mapbox/maps/extension/style/utils/TypeUtilsKt
    innerTypeInternal: com/mapbox/maps/plugin/annotation/generated/CircleAnnotationManager$special$$inlined$silentUnwrap$1$wm$TypeUtilsKt$WhenMappings
    innerName: WhenMappings

Info in obj/Debug/net8.0-android/lp/151/jl/classes.jar:com/mapbox/maps/plugin/annotation/generated/PointAnnotationManager$special$$inlined$silentUnwrap$10$wm$TypeUtilsKt$WhenMappings.class:
Malformed inner-class attribute:
    outerTypeInternal: com/mapbox/maps/extension/style/utils/TypeUtilsKt
    innerTypeInternal: com/mapbox/maps/plugin/annotation/generated/PointAnnotationManager$special$$inlined$silentUnwrap$10$wm$TypeUtilsKt$WhenMappings
    innerName: WhenMappings
AND SO ON
...
/.nuget/packages/xamarin.kotlin.stdlib/1.9.22.1/buildTransitive/net7.0-android33.0/../../jar/org.jetbrains.kotlin.kotlin-stdlib-1.9.22.jar:kotlin/collections/ArraysUtilJVM.class:
Type kotlin.collections.ArraysUtilJVM is defined multiple times: .../xamarin.kotlin.stdlib/1.9.22.1/buildTransitive/net7.0-android33.0/../../jar/org.jetbrains.kotlin.kotlin-stdlib-1.9.22.jar:kotlin/collections/ArraysUtilJVM.class, obj/Debug/net8.0-android/lp/180/jl/libs/E85EFB03D25E2E39.jar:kotlin/collections/ArraysUtilJVM
/.nuget/packages/xamarin.kotlin.stdlib/1.9.22.1/buildTransitive/net7.0-android33.0/../../jar/org.jetbrains.kotlin.kotlin-stdlib-1.9.22.jar:kotlin/collections/ArraysUtilJVM.class
    at Version.fakeStackEntry(Version_8.2.33.java:0)
    at com.android.tools.r8.T.a(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:5)

Caused by: com.android.tools.r8.utils.b: Type kotlin.collections.ArraysUtilJVM is defined multiple times: .../.nuget/packages/xamarin.kotlin.stdlib/1.9.22.1/buildTransitive/net7.0-android33.0/../../jar/org.jetbrains.kotlin.kotlin-stdlib-1.9.22.jar:kotlin/collections/ArraysUtilJVM.class, obj/Debug/net8.0-android/lp/180/jl/libs/E85EFB03D25E2E39.jar:kotlin/collections/ArraysUtilJVM.class
    at com.android.tools.r8.utils.Q2.a(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:21)
...
Directory 'obj/Debug/net8.0-android/lp/151' is from 'maps-annotation-10.11.1.aar'.
Directory 'obj/Debug/net8.0-android/lp/180' is from 'Square.OkIO.aar'. (JAVA0000) 
blackchalk commented 4 months ago

Closing issue as I have found solution it relates to https://github.com/xamarin/AndroidX/issues/800