Googleplayservicescomponents: APT1000: Attribute "buttonSize" already defined with incompatible format.

Created on 25 Nov 2020  路  2Comments  路  Source: xamarin/GooglePlayServicesComponents

I am trying to add Firebase Crashlytics in my Xamarin Forms app. However, I am getting an error attached in the link.

Steps to produce:
Add the Xamarin.Firebase.Crashlytics v 117.1.0 in Android project, build the project. Doesn't build the project and give the error.

Error Message

The package file

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>portable</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\Debug</OutputPath>
    <DefineConstants>DEBUG;</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <AndroidLinkMode>SdkOnly</AndroidLinkMode>
    <AotAssemblies>false</AotAssemblies>
    <EnableLLVM>false</EnableLLVM>
    <AndroidEnableProfiledAot>false</AndroidEnableProfiledAot>
    <BundleAssemblies>false</BundleAssemblies>
    <AndroidDexTool>d8</AndroidDexTool>
    <AndroidEnableSGenConcurrent>true</AndroidEnableSGenConcurrent>
    <AndroidEnableMultiDex>true</AndroidEnableMultiDex>
    <AndroidUseSharedRuntime>true</AndroidUseSharedRuntime>
    <EmbedAssembliesIntoApk>false</EmbedAssembliesIntoApk>
    <AndroidUseAapt2>false</AndroidUseAapt2>
    <LangVersion>8.0</LangVersion>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="MarcTron.Admob">
      <Version>1.6.0</Version>
    </PackageReference>
    <PackageReference Include="Plugin.CurrentActivity">
      <Version>2.1.0.4</Version>
    </PackageReference>
    <PackageReference Include="Plugin.InAppBilling">
      <Version>2.0.0</Version>
    </PackageReference>
    <PackageReference Include="Plugin.MediaManager">
      <Version>1.0.4</Version>
    </PackageReference>
    <PackageReference Include="Plugin.MediaManager.Forms">
      <Version>1.0.4</Version>
    </PackageReference>
    <PackageReference Include="Plugin.StoreReview">
      <Version>3.0.0-beta</Version>
    </PackageReference>
    <PackageReference Include="Rg.Plugins.Popup">
      <Version>2.0.0.7</Version>
    </PackageReference>
    <PackageReference Include="sqlite-net-pcl">
      <Version>1.7.335</Version>
    </PackageReference>
    <PackageReference Include="Xam.Plugin.Media">
      <Version>5.0.1</Version>
    </PackageReference>
    <PackageReference Include="Xam.Plugins.Forms.ProgressRing">
      <Version>0.1.2</Version>
    </PackageReference>
    <PackageReference Include="Xamarin.Android.Support.Compat">
      <Version>28.0.0.3</Version>
    </PackageReference>
    <PackageReference Include="Xamarin.Facebook.Android">
      <Version>7.1.0</Version>
    </PackageReference>
    <PackageReference Include="Xamarin.FFImageLoading">
      <Version>2.4.11.982</Version>
    </PackageReference>
    <PackageReference Include="Xamarin.FFImageLoading.Forms">
      <Version>2.4.11.982</Version>
    </PackageReference>
    <PackageReference Include="Xamarin.FFImageLoading.Transformations">
      <Version>2.4.11.982</Version>
    </PackageReference>
    <PackageReference Include="Xamarin.Essentials" Version="1.5.3.2" />
    <PackageReference Include="Xamarin.Firebase.Crashlytics">
      <Version>117.1.0</Version>
    </PackageReference>
    <PackageReference Include="Xamarin.Forms">
      <Version>4.8.0.1687</Version>
    </PackageReference>
    <PackageReference Include="Xamarin.Forms.PancakeView">
      <Version>2.1.0.714</Version>
    </PackageReference>
  </ItemGroup>

The errors
APT1000: Attribute "buttonSize" already defined with incompatible format.
APT1000: Attribute "colorScheme" already defined with incompatible format.
APT1000: Attribute "imageAspectRatioAdjust" already defined with incompatible format.
APT1000: Orginal attribute defined here.
Attribute "button" already defined with incompatible format.
Attribute "colorScheme" already defined with incompatible format.
Attribute "imageAspectRatioAdjust" already defined with incompatible format.
Orginal attribute defined here.

Clicking on any of these error lines, opens a new file "values.xml" (this file is auto generated by adding Xamarin.Firebase.Crashlytics package.
These error lines open two identical value.xml file (one error opens one and another opens another file both with same name and content).

Hence, I cannot use Firebase Crashlytics in my Xamarin Android project.

Most helpful comment

same issue here with v.117+. if i set 'aapt2' it stop this issue but then raises "java.exe" exited with code 1
v70. doesnt throw these errors

All 2 comments

same issue here with v.117+. if i set 'aapt2' it stop this issue but then raises "java.exe" exited with code 1
v70. doesnt throw these errors

same issue here with v.117+. if i set 'aapt2' it stop this issue but then raises "java.exe" exited with code 1
v70. doesnt throw these errors

I'm in the exact same situation.

I tried manually installing all the seemingly required packages from this list, but it made no difference.
Latest Android SDK versions

Was this page helpful?
0 / 5 - 0 ratings