For solving the Manifest merger failed problem, it has two methods to solve it. Two methods are below:
The first method is:
1. Migrate your project to AndroidX project.
The second method is:
2. Don't need to Migrate the project to the AndroidX project. Write code in the Manifest file.
How to Migrate your project to AndroidX project
If you are using old android studio libraries then you have to migrate your project to the AndroidX project. For migrating to the AndroidX project you have to add the following two lines into the "Gradle.properties" file in android studio.
Code:
First, go to the "Gradle.properties" file, then paste the above two lines. then click on "Sync Now". See the below images for better understanding.or you can migrate your project following way also. First, click on Refactor from the above menu in Android studio. Then select on Migrate to AndroidX.
After that you will get a confirmation window, you need to click on migrate. It will ask you to do backup your project before migrating to AndroidX.you should do the backup. Then it will migrate your project to AndroidX.
Second Method:
If you don't want to migrate your project to the AndroidX project, you can follow this second method for migrating to the AndroidX project. You need to just write below two lines of code in the Manifest file in the Android studio.
Code:
See below image:
The video tutorial of "How to solve Manifest merger failed problem in Android Studio" is here
No comments:
Post a Comment