Skip to content

Android library compiling issues due to uno out of date lib requirements #11

Description

@mitchcapper

You might need to add some extended instructions for uno. Unfortunately it currently pulls an older version than what the ML library requires and it seemed best was fixing the specific version uno requires. Sadly this has a hardcoded version number, for current:
Adding this to the solution got it working:

<propertygroup>
    <!--
  Plugin.Scanner.Uno pulls in MLKit, which requires newer AndroidX than the Uno SDK's
  implicit defaults (NU1605 package downgrade). These properties override the versions
  the Uno SDK injects for its implicit AndroidX PackageReferences.
-->
    <AndroidXActivityVersion>1.12.2.1</AndroidXActivityVersion>
    <AndroidXAppCompatVersion>1.7.1.2</AndroidXAppCompatVersion>
</propertygroup>
    <ItemGroup Condition="$(TargetFramework.Contains('-android'))">
        <!--
          androidx compose runtime-annotation ships as a KMP library: the .Android (aar) and .Jvm (jar)
          variants both define androidx.compose.runtime.* and both land in the graph, so D8 fails with
          "Type androidx.compose.runtime.Stable is defined multiple times". Gradle picks one variant;
 so drop the JVM one - .Android has the same types.
        -->
        <PackageReference Include="Xamarin.AndroidX.Compose.Runtime.Annotation.Jvm" ExcludeAssets="all" />
    </ItemGroup>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions