question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported`

See original GitHub issue

Please use Discussion board if you want get some help out of it. Please report issue if there is a bug.

Version of react-native-iap

7.5.1

Version of react-native

0.66.2

Platforms you faced the error (IOS or Android or both?)

Android

Expected behavior

No error

Actual behavior

Following error when running ./gradlew assembleRelease

> Task :react-native-iap:processAmazonReleaseManifest FAILED
/Users/ton.snoei/Documents/dev.nosync/trilab/IEXv7/src/reactnative/node_modules/react-native-iap/android/src/main/AndroidManifest.xml Error:
        Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported` when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.

See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.

Tested environment (Emulator? Real Device?)

n/a

Steps to reproduce the behavior

Use the following app/build.gradle settings

        buildToolsVersion = "30.0.2"
        minSdkVersion = 21
        compileSdkVersion = 31
        targetSdkVersion = 31

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

6reactions
tonsnoeicommented, Nov 25, 2021

You can resolve it yourself (for the time being) by replace the contents of the file /node_modules/react-native-iap/android/src/amazon/AndroidManifest.xml with

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="com.dooboolab.RNIap">
<application android:exported="true">
    <receiver android:name = "com.amazon.device.iap.ResponseReceiver"
        android:permission = "com.amazon.inapp.purchasing.Permission.NOTIFY" 
        android:exported="true">
        <intent-filter>
            <action android:name = "com.amazon.inapp.purchasing.NOTIFY" />
        </intent-filter>
    </receiver>
</application>
</manifest>

And the file /node_modules/react-native-iap/android/src/main/AndroidManifest.xml

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          android:exported="true"
          package="com.dooboolab.RNIap">

</manifest>
0reactions
SergiOnGitcommented, Dec 5, 2021

Would be great if you release it soon.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android Studio error: "Manifest merger failed: Apps targeting ...
Manifest merger failed : Apps targeting Android 12 and higher are required to specify an explicit value for android: exported when the ...
Read more >
Behavior changes: Apps targeting Android 12
If your app targets Android 12 or higher and contains activities, services, or broadcast receivers that use intent filters, you must explicitly declare...
Read more >
Issues - GitHub
Apps targeting Android 12 and higher are required to specify an explicit value for android:exported when the corresponding component has an intent filter...
Read more >
Apps targeting Android 12 and higher are required to specify ...
How to solve Android Error: Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported` when the ...
Read more >
Manifest merger failed : Apps targeting Android 12 and higher ...
Manifest merger failed : Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported` when the corresponding ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found