AndroidX icon indicating copy to clipboard operation
AndroidX copied to clipboard

Ошибка при установке Xamarin.Google Play Services.Based в MAUI net 8.0

Open Default8800 opened this issue 8 months ago • 4 comments

Android framework version

net8.0-android

Affected platform version

VS 2022 android 34.0

Description

When installing the Plugin.Firebase and Xamarin.Google Play Services.When compiling the project, an error appears to be with the AndroidX transit package, but no matter how much I try to fix it, it still doesn't work and there are only more problems.

console output:

1>MSBUILD : java.exe error JAVA0000: Error in obj\Debug\net8.0-android34.0\lp\137\jl\classes.jar:androidx/lifecycle/ViewModelKt.class:
1>MSBUILD : java.exe error JAVA0000: Type androidx.lifecycle.ViewModelKt is defined multiple times: obj\Debug\net8.0-android34.0\lp\137\jl\classes.jar:androidx/lifecycle/ViewModelKt.class, obj\Debug\net8.0-android34.0\lp\173\jl\classes.jar:androidx/lifecycle/ViewModelKt.class
1>MSBUILD : java.exe error JAVA0000: Compilation failed
1>MSBUILD : java.exe error JAVA0000: java.lang.RuntimeException: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: obj\Debug\net8.0-android34.0\lp\137\jl\classes.jar
1>MSBUILD : java.exe error JAVA0000: androidx/lifecycle/ViewModelKt.class
1>MSBUILD : java.exe error JAVA0000: 	at com.android.tools.r8.utils.S0.a(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:135)
1>MSBUILD : java.exe error JAVA0000: 	at com.android.tools.r8.D8.main(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:5)
1>MSBUILD : java.exe error JAVA0000: Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: obj\Debug\net8.0-android34.0\lp\137\jl\classes.jar:androidx/lifecycle/ViewModelKt.class
1>MSBUILD : java.exe error JAVA0000: 	at Version.fakeStackEntry(Version_8.2.33.java:0)
1>MSBUILD : java.exe error JAVA0000: 	at com.android.tools.r8.T.a(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:5)
1>MSBUILD : java.exe error JAVA0000: 	at com.android.tools.r8.utils.S0.a(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:82)
1>MSBUILD : java.exe error JAVA0000: 	at com.android.tools.r8.utils.S0.a(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:32)
1>MSBUILD : java.exe error JAVA0000: 	at com.android.tools.r8.utils.S0.a(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:31)
1>MSBUILD : java.exe error JAVA0000: 	at com.android.tools.r8.utils.S0.b(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:2)
1>MSBUILD : java.exe error JAVA0000: 	at com.android.tools.r8.D8.a(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:42)
1>MSBUILD : java.exe error JAVA0000: 	at com.android.tools.r8.D8.b(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:13)
1>MSBUILD : java.exe error JAVA0000: 	at com.android.tools.r8.D8.a(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:40)
1>MSBUILD : java.exe error JAVA0000: 	at com.android.tools.r8.utils.S0.a(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:122)
1>MSBUILD : java.exe error JAVA0000: 	... 1 more
1>MSBUILD : java.exe error JAVA0000: Caused by: com.android.tools.r8.utils.b: Type androidx.lifecycle.ViewModelKt is defined multiple times: obj\Debug\net8.0-android34.0\lp\137\jl\classes.jar:androidx/lifecycle/ViewModelKt.class, obj\Debug\net8.0-android34.0\lp\173\jl\classes.jar:androidx/lifecycle/ViewModelKt.class
1>MSBUILD : java.exe error JAVA0000: 	at com.android.tools.r8.utils.Q2.a(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:21)
1>MSBUILD : java.exe error JAVA0000: 	at com.android.tools.r8.utils.D2.a(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:54)
1>MSBUILD : java.exe error JAVA0000: 	at com.android.tools.r8.utils.D2.a(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:10)
1>MSBUILD : java.exe error JAVA0000: 	at java.base/java.util.concurrent.ConcurrentHashMap.merge(ConcurrentHashMap.java:2056)
1>MSBUILD : java.exe error JAVA0000: 	at com.android.tools.r8.utils.D2.a(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:6)
1>MSBUILD : java.exe error JAVA0000: 	at com.android.tools.r8.graph.m4$a.d(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:6)
1>MSBUILD : java.exe error JAVA0000: 	at com.android.tools.r8.dex.c.a(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:61)
1>MSBUILD : java.exe error JAVA0000: 	at com.android.tools.r8.dex.c.a(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:12)
1>MSBUILD : java.exe error JAVA0000: 	at com.android.tools.r8.dex.c.a(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:9)
1>MSBUILD : java.exe error JAVA0000: 	at com.android.tools.r8.D8.a(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:45)
1>MSBUILD : java.exe error JAVA0000: 	at com.android.tools.r8.D8.d(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:17)
1>MSBUILD : java.exe error JAVA0000: 	at com.android.tools.r8.D8.c(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:69)
1>MSBUILD : java.exe error JAVA0000: 	at com.android.tools.r8.utils.S0.a(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:28)
1>MSBUILD : java.exe error JAVA0000: 	... 6 more
1>MSBUILD : java.exe error JAVA0000: Directory 'obj\Debug\net8.0-android34.0\lp\137' is from 'androidx.lifecycle.lifecycle-viewmodel-android.aar'.
1>Сборка проекта "JKC.csproj" завершена с ошибкой.

код .csproj :

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFrameworks>net8.0-maccatalyst;net8.0-android34.0</TargetFrameworks>
    <TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
    
    <OutputType>Exe</OutputType>
    <RootNamespace>JKC</RootNamespace>
    <UseMaui>true</UseMaui>
    <SingleProject>true</SingleProject>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>

    <!-- Display name -->
    <ApplicationTitle>JKC</ApplicationTitle>
    <ApplicationId>com.companyname.jkc</ApplicationId>
    <ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
    <ApplicationVersion>1</ApplicationVersion>

    <!-- Platform versions -->
    <SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">11.0</SupportedOSPlatformVersion>
    <SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">13.1</SupportedOSPlatformVersion>
    <SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">31.0</SupportedOSPlatformVersion>
    <SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
    <TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
    
    <!-- Temporary build settings to fix conflicts -->
    <AndroidLinkMode>None</AndroidLinkMode>
    <AndroidEnableProguard>false</AndroidEnableProguard>
    <AssemblyVersion>1.0.0</AssemblyVersion>
  </PropertyGroup>

  <!-- Conditional properties for different configurations -->
  <PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net8.0-android|AnyCPU'">
    <ApplicationTitle>ЖИЛКОМЦЕНТР</ApplicationTitle>
    <ApplicationDisplayVersion>1.0.0</ApplicationDisplayVersion>
  </PropertyGroup>

  <PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net8.0-maccatalyst|AnyCPU'">
    <ApplicationTitle>ЖИЛКОМЦЕНТР</ApplicationTitle>
    <ApplicationDisplayVersion>1.0.0</ApplicationDisplayVersion>
  </PropertyGroup>

  <PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net8.0-windows10.0.19041.0|AnyCPU'">
    <ApplicationTitle>ЖИЛКОМЦЕНТР</ApplicationTitle>
    <ApplicationDisplayVersion>1.0.0</ApplicationDisplayVersion>
  </PropertyGroup>

  <PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net8.0-android|AnyCPU'">
    <ApplicationTitle>ЖИЛКОМЦЕНТР</ApplicationTitle>
    <ApplicationDisplayVersion>1.0.0</ApplicationDisplayVersion>
  </PropertyGroup>

  <PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net8.0-maccatalyst|AnyCPU'">
    <ApplicationTitle>ЖИЛКОМЦЕНТР</ApplicationTitle>
    <ApplicationDisplayVersion>1.0.0</ApplicationDisplayVersion>
  </PropertyGroup>

  <PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net8.0-windows10.0.19041.0|AnyCPU'">
    <ApplicationTitle>ЖИЛКОМЦЕНТР</ApplicationTitle>
    <ApplicationDisplayVersion>1.0.0</ApplicationDisplayVersion>
  </PropertyGroup>

  <!-- Resources -->
  <ItemGroup>
    <MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4" />
    <MauiIcon Include="Resources\AppIcon\logo_desc.svg" />
    <MauiSplashScreen Include="Resources\Images\logo_splash.svg" Color="#FFFFFF" BaseSize="128,128" />
    <MauiSplashScreen Include="Resources\Images\money_menu.png" />
    <MauiImage Include="Resources\Images\*" />
    <MauiImage Update="Resources\Images\dotnet_bot.png" Resize="True" BaseSize="300,185" />
    <MauiFont Include="Resources\Fonts\*" />
    <MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
  </ItemGroup>

  <ItemGroup>
    <MauiImage Remove="Resources\Images\logo_splash.svg" />
    <MauiImage Remove="Resources\Images\money_menu.png" />
    <None Remove="Resources\AppIcon\logo_desc.svg" />
  </ItemGroup>

  <!-- Common packages -->
  <ItemGroup>
    <PackageReference Include="CommunityToolkit.Maui" Version="8.0.0" />
    <PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.1" />
    <PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
    <PackageReference Include="Plugin.Fingerprint" Version="3.0.0-beta.1" />
    <PackageReference Include="SkiaSharp" Version="3.116.1" />
    <PackageReference Include="Xamarin.MediaGallery" Version="2.2.1" />
  </ItemGroup>

  <!-- Android-specific packages -->
  <ItemGroup Condition="'$(TargetFramework)' == 'net8.0-android34.0'">
    <!-- Firebase -->
    <PackageReference Include="Plugin.Firebase.CloudMessaging" Version="3.1.2" />
    <PackageReference Include="Xamarin.GooglePlayServices.Base" Version="118.5.0.4" />
    <GoogleServicesJson Include="Platforms\Android\google-services.json" />
    
    <!-- AndroidX packages with consistent versions -->
    <PackageReference Include="Xamarin.AndroidX.Core" Version="1.15.0.2" />
    <PackageReference Include="Xamarin.AndroidX.Collection" Version="1.4.5.2" />
    <PackageReference Include="Xamarin.AndroidX.Collection.Ktx" Version="1.4.5.2" />
  
	<!-- AndroidX Lifecycle - единые версии -->
	  <PackageReference Include="Xamarin.AndroidX.Activity.Ktx" Version="1.7.2.1" />
    <PackageReference Include="Xamarin.AndroidX.Lifecycle.Process" Version="2.6.2" />
    <PackageReference Include="Xamarin.AndroidX.Lifecycle.Runtime" Version="2.8.7.2" />
    <PackageReference Include="Xamarin.AndroidX.Lifecycle.ViewModel" Version="2.8.7.2" />
    <PackageReference Include="Xamarin.AndroidX.Lifecycle.ViewModel.Ktx" Version="2.6.2" />
  </ItemGroup>

  <!-- XAML compilation -->
  <ItemGroup>
    <MauiXaml Update="Pages\CodePage.xaml">
      <Generator>MSBuild:Compile</Generator>
    </MauiXaml>
    <MauiXaml Update="Pages\DefaultPage.xaml">
      <Generator>MSBuild:Compile</Generator>
    </MauiXaml>
    <MauiXaml Update="Pages\DocsPage.xaml">
      <Generator>MSBuild:Compile</Generator>
    </MauiXaml>
    <MauiXaml Update="Pages\Kvitanciya.xaml">
      <Generator>MSBuild:Compile</Generator>
    </MauiXaml>
    <MauiXaml Update="Pages\LoginPage.xaml">
      <Generator>MSBuild:Compile</Generator>
    </MauiXaml>
    <MauiXaml Update="Pages\MoneyPage.xaml">
      <Generator>MSBuild:Compile</Generator>
    </MauiXaml>
    <MauiXaml Update="Pages\PayPageSber.xaml">
      <Generator>MSBuild:Compile</Generator>
    </MauiXaml>
    <MauiXaml Update="Pages\PokazaniyaPage.xaml">
      <Generator>MSBuild:Compile</Generator>
    </MauiXaml>
    <MauiXaml Update="Pages\SettingsPage.xaml">
      <Generator>MSBuild:Compile</Generator>
    </MauiXaml>
  </ItemGroup>

</Project>

Steps to Reproduce

1.install Plugin.Firebase 2.install Xamarin.GooglePlayServices.Base 3.launch the project build

Did you find any workaround?

No response

Relevant log output


Default8800 avatar Apr 22 '25 03:04 Default8800

Thanks for the feedback.

Related

https://github.com/dotnet/android-libraries/issues/764

moljac avatar Apr 22 '25 07:04 moljac

Given:

<Project Sdk="Microsoft.NET.Sdk">

	<PropertyGroup>
		<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
		<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
		<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
		<!-- <TargetFrameworks>$(TargetFrameworks);net8.0-tizen</TargetFrameworks> -->

		<!-- Note for MacCatalyst:
		The default runtime is maccatalyst-x64, except in Release config, in which case the default is maccatalyst-x64;maccatalyst-arm64.
		When specifying both architectures, use the plural <RuntimeIdentifiers> instead of the singular <RuntimeIdentifier>.
		The Mac App Store will NOT accept apps with ONLY maccatalyst-arm64 indicated;
		either BOTH runtimes must be indicated or ONLY macatalyst-x64. -->
		<!-- For example: <RuntimeIdentifiers>maccatalyst-x64;maccatalyst-arm64</RuntimeIdentifiers> -->

		<OutputType>Exe</OutputType>
		<RootNamespace>AppMAUI</RootNamespace>
		<UseMaui>true</UseMaui>
		<SingleProject>true</SingleProject>
		<ImplicitUsings>enable</ImplicitUsings>
		<Nullable>enable</Nullable>

		<!-- Display name -->
		<ApplicationTitle>AppMAUI</ApplicationTitle>

		<!-- App Identifier -->
		<ApplicationId>com.companyname.appmaui</ApplicationId>

		<!-- Versions -->
		<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
		<ApplicationVersion>1</ApplicationVersion>

		<!-- To develop, package, and publish an app to the Microsoft Store, see: https://aka.ms/MauiTemplateUnpackaged -->
		<WindowsPackageType>None</WindowsPackageType>

		<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">15.0</SupportedOSPlatformVersion>
		<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">15.0</SupportedOSPlatformVersion>
		<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
		<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
		<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
		<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>
	</PropertyGroup>

	<ItemGroup>
		<!-- App Icon -->
		<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4" />

		<!-- Splash Screen -->
		<MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#512BD4" BaseSize="128,128" />

		<!-- Images -->
		<MauiImage Include="Resources\Images\*" />
		<MauiImage Update="Resources\Images\dotnet_bot.png" Resize="True" BaseSize="300,185" />

		<!-- Custom Fonts -->
		<MauiFont Include="Resources\Fonts\*" />

		<!-- Raw Assets (also remove the "Resources\Raw" prefix) -->
		<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
	</ItemGroup>

	<ItemGroup>
		<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
		<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.0" />
	</ItemGroup>

</Project>

Adding

	<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">
		<PackageReference Include="Plugin.Firebase" Version="3.1.4" />
	</ItemGroup>

results in:

    MSBUILD : java error JAVA0000: 
      Error in $HOME/.nuget/packages/xamarin.androidx.collection.jvm/1.4.0.4/buildTransitive/net8.0-android34.0/../../jar/androidx.collection.collection-jvm.jar:androidx/collection/ArrayMapKt.class:
      Type androidx.collection.ArrayMapKt is defined multiple times: $HOME/.nuget/packages/xamarin.androidx.collection.jvm/1.4.0.4/buildTransitive/net8.0-android34.0/../../jar/androidx.collection.collection-jvm.jar:androidx/collecti
      on/ArrayMapKt.class, $HOME/.nuget/packages/xamarin.androidx.collection.ktx/1.2.0.9/buildTransitive/net6.0-android31.0/../../jar/androidx.collection.collection-ktx.jar:androidx/collection/ArrayMapKt.class
      Compilation failed
      java.lang.RuntimeException: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: $HOME/.nuget/packages/xamarin.androidx.collection.jvm/1.4.0.4/buildTransitive/net8.0-android34.0/../../jar/an
      droidx.collection.collection-jvm.jar
      androidx/collection/ArrayMapKt.class
      	at com.android.tools.r8.utils.S0.a(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:135)
      	at com.android.tools.r8.D8.main(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:5)
      Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: $HOME/.nuget/packages/xamarin.androidx.collection.jvm/1.4.0.4/buildTransitive/net8.0-android34.0/../../jar/androidx.collection
      .collection-jvm.jar:androidx/collection/ArrayMapKt.class
      	at Version.fakeStackEntry(Version_8.2.33.java:0)
      	at com.android.tools.r8.T.a(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:5)
      	at com.android.tools.r8.utils.S0.a(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:82)
      	at com.android.tools.r8.utils.S0.a(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:32)
      	at com.android.tools.r8.utils.S0.a(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:31)
      	at com.android.tools.r8.utils.S0.b(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:2)
      	at com.android.tools.r8.D8.a(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:42)
      	at com.android.tools.r8.D8.b(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:13)
      	at com.android.tools.r8.D8.a(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:40)
      	at com.android.tools.r8.utils.S0.a(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:122)
      	... 1 more
      Caused by: com.android.tools.r8.utils.b: Type androidx.collection.ArrayMapKt is defined multiple times: $HOME/.nuget/packages/xamarin.androidx.collection.jvm/1.4.0.4/buildTransitive/net8.0-android34.0/../../jar/androidx.collec
      tion.collection-jvm.jar:androidx/collection/ArrayMapKt.class, $HOME/.nuget/packages/xamarin.androidx.collection.ktx/1.2.0.9/buildTransitive/net6.0-android31.0/../../jar/androidx.collection.collection-ktx.jar:androidx/collectio
      n/ArrayMapKt.class
      	at com.android.tools.r8.utils.Q2.a(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:21)
      	at com.android.tools.r8.utils.D2.a(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:54)
      	at com.android.tools.r8.utils.D2.a(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:10)
      	at java.base/java.util.concurrent.ConcurrentHashMap.merge(ConcurrentHashMap.java:2056)
      	at com.android.tools.r8.utils.D2.a(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:6)
      	at com.android.tools.r8.graph.m4$a.d(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:6)
      	at com.android.tools.r8.dex.c.a(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:61)
      	at com.android.tools.r8.dex.c.a(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:12)
      	at com.android.tools.r8.dex.c.a(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:9)
      	at com.android.tools.r8.D8.a(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:45)
      	at com.android.tools.r8.D8.d(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:17)
      	at com.android.tools.r8.D8.c(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:69)
      	at com.android.tools.r8.utils.S0.a(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:28)
      	... 6 more
      
  AppMAUI net8.0-ios succeeded with 1 warning(s) (39,8s) → AppMAUI/bin/Debug/net8.0-ios/iossimulator-arm64/AppMAUI.dll
    /Users/Shared/Projects/d/tmp/AI/Copilot/AppMAUI/AppMAUI.csproj : warning NU1604: Project dependency Microsoft.Maui.Controls does not contain an inclusive lower bound. Include a lower bound in the dependency version to ensure consistent restore results.

moljac avatar Apr 22 '25 09:04 moljac

@Default8800

Few questions:

  1. why did you add/install Xamarin.GooglePlayServices.Base?
  2. can you provide complete *.csproj, please?

Thanks

moljac avatar Apr 22 '25 09:04 moljac

csproj.txt

Xamarin.GooglePlayServices.Base it is needed to work with a json file , which in turn is needed to work with Firebase .

Default8800 avatar Apr 22 '25 10:04 Default8800