问题
This seems to be manifest merging error. I'm trying to port existing code to instant app module. What I've tried is :
- Changed main app module to baseFeatureModule.
- Created a new module completeApp.
Emptied completeAppModule's Manifest :
added implementation project entry in completeAppModule
implementation project (":udofy")
Added these entries in base module :
baseFeature true in android block
application project (":fullModule") in dependencies
I've tried rebuilding/ invalidate cache and restart/ Restarting studio but no help. Can anybody help me out here?
回答1:
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>
回答2:
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.
回答3:
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
来源:https://stackoverflow.com/questions/46120608/android-instant-app-default-activity-not-found