2

This is the error I get when I add android:usesCleartextTraffic="true" to theAndroidManifest.xml.

Manifest merger failed : Attribute application@usesCleartextTraffic value=(true) from AndroidManifest.xml:29:9-44
is also present at [com.payu.custombrowser:payu-custom-browser:7.5.1] AndroidManifest.xml:17:18-54 value=(false).
Suggestion: add 'tools:replace="android:usesCleartextTraffic"' to <application> element at AndroidManifest.xml:19:5-181:19 to override.
ADM
  • 20,406
  • 11
  • 52
  • 83

1 Answers1

6

The answer lies in your question body. You have same attribute android:usesCleartextTraffic="true" in two different AndroidManifest.xml files in your project. So simply resolve the issue by adding tools:replace="android:usesCleartextTraffic" to your application tag:

<application
    android:usesCleartextTraffic="true"
    tools:replace="android:usesCleartextTraffic">
 
 //...

</application>
Sabrina
  • 2,531
  • 1
  • 32
  • 30
sajjad
  • 834
  • 6
  • 13
  • 1
    For me, adding above command showed another error `The prefix "tools" for attribute "tools:replace" associated with an element type "application" is not bound.` resolved by https://stackoverflow.com/a/39323808/4353782 – Mayur Dhurpate Jun 11 '22 at 14:55