This seems to be manifest merging error. I\'m trying to port existing code to instant app module. What I\'ve tried is :
I figured out, that the Manifest merger failed with the Firebase plugin in the base module.
Option 1:
I fixed this by adding following to the base modules 'AndroidManifest.xml'.
<provider
android:name="com.google.firebase.provider.FirebaseInitProvider"
android:authorities="mypackage.firebaseinitprovider"
android:exported="false"
tools:node="merge"/>
Don't forget to replace mypackage
.
Option 2:
Copy the whole <application ...>...</application>
tag into app modules AndroidManifest.xml
Based from this thread, there is no sources tab in later versions of Android Studio. However, you can edit the build.gradl
e file instead. See this link. Also make sure that you have specified the default activity in your AndroidManisfest.xml
file. Within your default activity's xml section, there should be these tags:
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
The issue for me was that I was using crashlytics and another debug utility that do not play well with instant apps. This was causing the manifest merging to fail. When I removed Crashlytics and the other utility, the manifest for the APK was able to be successfully generated and Android Studio was able to find the default activity which was present in the base feature.