2

I have a multi-feature instant app setup and when I try to view the merged manifest of the application I see the following:

Error: Attribute provider#com.crashlytics.android.CrashlyticsInitProvider@authorities
value=(com.happyapp.app.crashlyticsinitprovider) from AndroidManifest.xml:14:13-75 is also present
at AndroidManifest.xml:40:87-161 value=(com.happyapp.app.app.crashlyticsinitprovider). Suggestion: add 'tools:replace="android:authorities"' to <provider> element at AndroidManifest.xml:12:9-16:39 to override. app main manifest (this file), line 13

I have looked multiple places and have not found any way to fix this. I can follow the suggestion, but the line that is mentioned to fix doesn't exist in the manifest.

This is the installed app manifest:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.happyapp.app" />
dazza5000
  • 7,075
  • 9
  • 44
  • 89
  • Perhaps copy/past your app Manifest xml to see if we can help – velval Feb 14 '18 at 01:18
  • Is that the complete manifest of your app module? from the logs it seems you have a setup and the crashlytic library is also defining. If you have a try add what the logs suggest. – velval Feb 14 '18 at 01:27
  • Yes. It is very simple. It is just meant to be a simple manifest that aggregates all of the modules (base + features) – dazza5000 Feb 14 '18 at 01:28
  • If I remove crashlytics then everything works. – dazza5000 Feb 14 '18 at 01:29
  • check all of your module manifest then and see if any defines . Also if you can add the crashlytics library as source you may be able to modify the manifest yourself – velval Feb 14 '18 at 01:34
  • I will. I think it is the fabric gradle plugin that is adding the provider. – dazza5000 Feb 14 '18 at 01:45
  • Can you file a bug to Google, then link to it back in here? It would be helpful for all, thanks! https://issuetracker.google.com/issues/new?component=316045&template=1018787 – Prags Feb 16 '18 at 04:37

1 Answers1

0

My colleague was able to workaround the issue by adding the following element to the installed apk AndroidManifest.xml

<application>
    <provider
        android:name="com.crashlytics.android.CrashlyticsInitProvider"
        android:authorities="com.happy.happyapp.happyapp.crashlyticsinitprovider"
        tools:replace="android:authorities" />
</application>
dazza5000
  • 7,075
  • 9
  • 44
  • 89