-
Notifications
You must be signed in to change notification settings - Fork 532
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crashlytics for Android generates conflicting provider #2141
Comments
From @Redth on September 4, 2018 20:43 After some investigation it looks like the original This second manifest file is getting picked up by xamarin.android during the build process (this is evidenced by the fact that we see two Given that Xamarin.Android rewrites these placeholders before sending to aapt anyway, I think it probably should be ignoring manifests found in the In the meantime we can probably patch Xamarin.Build.Download to also drop these entries when embedding the .aar in the .dll at build time. |
Context: https://stackoverflow.com/questions/41592744/function-of-aapt-androidmanifest-xml-in-aar Fixes: dotnet#2141 Apparently Android Studio is now shipping a duplicate, pre-formatted `AndroidManifest.xml` file, inside of AAR files. Its purpose is to be used with `aapt` invocations, since errors may be thrown related to `{` or `}` characters. Since this file may exist in AAR files used by Xamarin.Android, we should ignore `aapt/AndroidManifest.xml` files the same way we ignore them inside `manifest` or `bin` directories. Changes: - Added a `IgnoredManifestDirectories` list, since we are getting to a point where `!= && != && !=` would be a lot of noise. - Switched the LINQ expression to simple `foreach` loop, which should also give a slight performance benefit.
But the app project fails to build with: obj\Debug\android\src\mono\io\fabric\sdk\android\services\events\EventsStorageListenerImplementor.java(8,40): error: package io.fabric.sdk.android.services.events does not exist io.fabric.sdk.android.services.events.EventsStorageListener [C:\Users\jopepper\Desktop\Git\xamarin-android\bin\TestDebug\temp\ExtraAaptManifest\UnnamedProject.csproj]
Context: https://stackoverflow.com/questions/41592744/function-of-aapt-androidmanifest-xml-in-aar Fixes: dotnet#2141 Apparently Android Studio is now shipping a duplicate, pre-formatted `AndroidManifest.xml` file, inside of AAR files. Its purpose is to be used with `aapt` invocations, since errors may be thrown related to `{` or `}` characters. Since this file may exist in AAR files used by Xamarin.Android, we should ignore `aapt/AndroidManifest.xml` files the same way we ignore them inside `manifest` or `bin` directories. Changes: - Added a `IgnoredManifestDirectories` list, since we are getting to a point where `!= && != && !=` would be a lot of noise. - Switched the LINQ expression to simple `foreach` loop, which should also give a slight performance benefit.
* [Xamarin.Android.Build.Tasks] ignore aapt/AndroidManifest.xml Context: https://stackoverflow.com/questions/41592744/function-of-aapt-androidmanifest-xml-in-aar Fixes: #2141 Apparently Android Studio is now shipping a duplicate, pre-formatted `AndroidManifest.xml` file, inside of AAR files. Its purpose is to be used with `aapt` invocations, since errors may be thrown related to `{` or `}` characters. Since this file may exist in AAR files used by Xamarin.Android, we should ignore `aapt/AndroidManifest.xml` files the same way we ignore them inside `manifest` or `bin` directories. Changes: - Added a `IgnoredManifestDirectories` list, since we are getting to a point where `!= && != && !=` would be a lot of noise. - Switched the LINQ expression to simple `foreach` loop, which should also give a slight performance benefit. * Fix test on MacOS
I have updated to the latest version of Visual Studio. Still getting the same error while installing multiple apps with crashlytics PFB visual studio details Visual Studio Community 2017 for Mac
Mono Framework MDK NuGet .NET Core Xamarin.Profiler Apple Developer Tools Xamarin.Mac Xamarin.iOS Xamarin.Android SDK Tools Version: 26.1.1 Java SDK: /Users/a962906/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_1.8.0.9 Android Designer EPL code available here: Android Device Manager Xamarin Inspector Build Information Operating System |
@nidhinvnm this fix didn't make it into Xamarin.Android 9.1.x, due to poor timing, sorry. You can get it in the Visual Studio 2019 previews today, I think the version of Xamarin.Android should be 9.1.100.x or higher. |
Thanks @jonathanpeppers . It is working perfectly after installing Xamarin.Android 9.1.101.6 with Visual studio 2019 preview. |
Hi, if I understand the status of this bug correctly, I can't release a xamarin android application now with crashlytics installed? Thanks for your help |
@sl-maelledelay you might also try updating to the latest Xamarin.Build.Download, they put a workaround in there for this issue. Searching Google, it currently says VS 2019's release date is April 2. There may be a preview that has a "go-live" license before that date--but I don't know for sure. |
@jonathanpeppers Thanks for your answer. The last version of Xamarin.Build.Download is a preview one. The lastest not in preview is 0.4.11. Is the workaround in this stable one? |
From @deckerst on September 4, 2018 6:54
Crashlytics aar manifest relies on
${applicationId}
for its providers. One of them is misinterpreted and replaced bydollar_openBracket_applicationId_closeBracket
in the final app manifest:As this is a static string it is not unique to the app, so it conflicts with any other app that also uses Crashlytics. Installation of the second app will then fail with
INSTALL_FAILED_CONFLICTING_PROVIDER
. This is a blocker for us as we developed several Xamarin apps and we urgently need to replace Firebase Crash Reporting by Crashlytics in all of them.Copied from original issue: xamarin/XamarinComponents#444
The text was updated successfully, but these errors were encountered: