GooglePlayServicesComponents icon indicating copy to clipboard operation
GooglePlayServicesComponents copied to clipboard

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

Open arahmancsd opened this issue 4 years ago • 3 comments

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.

arahmancsd avatar Nov 25 '20 18:11 arahmancsd

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

stevehawkins avatar Nov 26 '20 15:11 stevehawkins

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

JesperNJessen avatar Nov 27 '20 06:11 JesperNJessen

I'm not sure what changed, but I was recently able to update my packages to the latest versions and get Crashlytics working again. I'm still using the 'aapt2' setting, but I'm no longer getting the '"java.exe" exited with code 1' error.

So for my part, this is resolved :)

JesperNJessen avatar Feb 02 '21 14:02 JesperNJessen