Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Android app is not compiling after adding Xamarin.Android.Crashlytics to the project #766

Open
hRupanjan opened this issue Dec 13, 2019 · 10 comments

Comments

@hRupanjan
Copy link

hRupanjan commented Dec 13, 2019

The app was working perfectly before adding the aforementioned library. After the addition of the library this error is given.
image

The app has a dependency on Xamarin.Firebase.Messaging.

This is the BuildLog that came with it.

NU1608: Detected package version outside of dependency constraint: Xamarin.Firebase.Analytics 60.1142.1 requires Xamarin.GooglePlayServices.Basement (= 60.1142.1) but version Xamarin.GooglePlayServices.Basement 71.1620.0 was resolved.
NU1608: Detected package version outside of dependency constraint: Xamarin.Firebase.Analytics 60.1142.1 requires Xamarin.Firebase.Common (= 60.1142.1) but version Xamarin.Firebase.Common 71.1610.0 was resolved.
NU1608: Detected package version outside of dependency constraint: Xamarin.Firebase.Analytics.Impl 60.1142.1 requires Xamarin.GooglePlayServices.Basement (= 60.1142.1) but version Xamarin.GooglePlayServices.Basement 71.1620.0 was resolved.
NU1608: Detected package version outside of dependency constraint: Xamarin.Firebase.Analytics.Impl 60.1142.1 requires Xamarin.GooglePlayServices.Tasks (= 60.1142.1) but version Xamarin.GooglePlayServices.Tasks 71.1601.0 was resolved.
NU1608: Detected package version outside of dependency constraint: Xamarin.Firebase.Analytics.Impl 60.1142.1 requires Xamarin.Firebase.Iid (= 60.1142.1) but version Xamarin.Firebase.Iid 71.1710.0 was resolved.
NU1608: Detected package version outside of dependency constraint: Xamarin.Firebase.Analytics.Impl 60.1142.1 requires Xamarin.Firebase.Common (= 60.1142.1) but version Xamarin.Firebase.Common 71.1610.0 was resolved.
1>------ Build started: Project: MyApp.Android, Configuration: Debug Any CPU ------
1>C:\Development\CrossPlatformMobileApp\MyApp\MyApp\MyApp.Android\obj\Debug\90\lp\70\jl\res\values\values.xml(6): error APT0000: Attribute "mapType" already defined with incompatible format.
1>C:\Development\CrossPlatformMobileApp\MyApp\MyApp\MyApp.Android\obj\Debug\90\lp\79\jl\res\values\values.xml(7): error APT0000: Original attribute defined here.
1>C:\Development\CrossPlatformMobileApp\MyApp\MyApp\MyApp.Android\obj\Debug\90\lp\67\jl\res\values\values.xml(35): error APT0000: Attribute "imageAspectRatioAdjust" already defined with incompatible format.
1>C:\Development\CrossPlatformMobileApp\MyApp\MyApp\MyApp.Android\obj\Debug\90\lp\78\jl\res\values\values.xml(36): error APT0000: Original attribute defined here.
1>C:\Development\CrossPlatformMobileApp\MyApp\MyApp\MyApp.Android\obj\Debug\90\lp\67\jl\res\values\values.xml(48): error APT0000: Attribute "buttonSize" already defined with incompatible format.
1>C:\Development\CrossPlatformMobileApp\MyApp\MyApp\MyApp.Android\obj\Debug\90\lp\78\jl\res\values\values.xml(49): error APT0000: Original attribute defined here.
1>C:\Development\CrossPlatformMobileApp\MyApp\MyApp\MyApp.Android\obj\Debug\90\lp\67\jl\res\values\values.xml(56): error APT0000: Attribute "colorScheme" already defined with incompatible format.
1>C:\Development\CrossPlatformMobileApp\MyApp\MyApp\MyApp.Android\obj\Debug\90\lp\78\jl\res\values\values.xml(57): error APT0000: Original attribute defined here.
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========

Please give some intel on how can we fix this.

@timrisi
Copy link

timrisi commented Dec 19, 2019

I'm running into this same build issue. App was working fine with firebase messaging and analytics, tried to add Crashlytics and get the same build errors as above.

@Redth
Copy link
Member

Redth commented Dec 20, 2019

Are you using AAPT2?

@timrisi
Copy link

timrisi commented Dec 20, 2019

I am not currently Using aapt2. I was able to get it building successfully by downgrading Xamarin.build.download to 4.11 after installing Xamarin.android.crashlytics, which also downgrades the crashlytics packages to a lower version

@mattleibow
Copy link
Collaborator

Might be related, NuGet is saying that the package versions can't be met.

NU1608: Detected package version outside of dependency constraint:
Xamarin.Firebase.Analytics 60.1142.1 requires Xamarin.GooglePlayServices.Basement (= 60.1142.1) but version Xamarin.GooglePlayServices.Basement 71.1620.0 was resolved.

Try updating Firebase. Not sure if we should be bumping the dependencies if it is a dependency.

@SandipAhluwalia
Copy link

SandipAhluwalia commented Dec 20, 2019

I am seeing this issue too when trying to update the Xamarin.Firebase.Messaging package to v71.1740.0 along with its dependencies. Not sure if the Xamarin Firebase stuff is related to this repo, but seeing following errors that are similar to ones described above:

2>C:\MyDAFOutput\90\lp\96\jl\res\values\values.xml(35): error APT1000: Attribute "imageAspectRatioAdjust" already defined with incompatible format.
2>C:\MyDAFOutput\90\lp\104\jl\res\values\values.xml(36): error APT1000: Original attribute defined here.
2>C:\MyDAFOutput\90\lp\96\jl\res\values\values.xml(48): error APT1000: Attribute "buttonSize" already defined with incompatible format.
2>C:\MyDAFOutput\90\lp\104\jl\res\values\values.xml(49): error APT1000: Original attribute defined here.
2>C:\MyDAFOutput\90\lp\96\jl\res\values\values.xml(56): error APT1000: Attribute "colorScheme" already defined with incompatible format.
2>C:\MyDAFOutput\90\lp\104\jl\res\values\values.xml(57): error APT1000: Original attribute defined here.

UPDATE: I downgraded one of the dependencies called Xamarin.Build.Download to 0.4.11 from the initial update to 0.7.1 from 0.4.9 as Xamarin.Firebase.Messaging mentions it only requires this dependency to be 0.4.11 and over. This action somehow made everything build okay without errors mentioned above.

@HADITO002
Copy link

@SandipAhluwalia Thanks for your solution. It worked for me after one week wrestle with this. But in the future, can we update Xamarin.Build.Download?

@SandipAhluwalia
Copy link

@HADITO002 Glad it is now building for you too. Regarding Xamarin.Build.Download, I am not sure about updating it in the future. It is a Xamarin Component so does need addressing as it is used by many other packages.

@Saccomani
Copy link

Just downgrade the Xamarin.Build.Download to 0.4.11... will works fine!

@jonathanantoine
Copy link

same thing for me :(

@Saccomani
Copy link

same thing for me :(

#766 (comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants