Musaab
Musaab

Reputation: 1604

No receiver in React Native Webview App upgrading from API 33 to 34, but "One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED Should be Specified"

I have a React Native Webview app that’s sole purpose is showing a website.

When upgrading the target API, per Google’s request, from 33 to 34, I’m getting the "One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED Should be Specified" error.

I searched online and all the answers say to declare your receiver as not being exported, but there is no receiver in our app. Nothing to declare.

I searched the whole codebase for the word “receiver” and even stuff that would normally appear around it in code I’ve seen online, and we have none of that in our project.

Any help would be greatly appreciated. Thank you.

Edit: No receivers in merged manifest.

Here’s my package.json:

{
  "name": "myapp",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "lint": "eslint .",
    "start": "react-native start",
    "test": "jest"
  },
  "dependencies": {
    "@react-native-community/geolocation": "^3.0.5",
    "react": "18.2.0",
    "react-native": "0.71.4",
    "react-native-dotenv": "^3.4.8",
    "react-native-loading-spinner-overlay": "^3.0.1",
    "react-native-webview": "^11.26.1"
  },
  "devDependencies": {
    "@babel/core": "^7.20.0",
    "@babel/preset-env": "^7.20.0",
    "@babel/runtime": "^7.20.0",
    "@react-native-community/eslint-config": "^3.2.0",
    "@tsconfig/react-native": "^2.0.2",
    "@types/jest": "^29.2.1",
    "@types/node": "^18.16.1",
    "@types/react": "^18.0.24",
    "@types/react-test-renderer": "^18.0.0",
    "babel-jest": "^29.2.1",
    "eslint": "^8.19.0",
    "jest": "^29.2.1",
    "metro-react-native-babel-preset": "^0.73.8",
    "prettier": "^2.4.1",
    "react-test-renderer": "18.2.0",
    "typescript": "4.8.4"
  },
  "jest": {
    "preset": "react-native"
  }
}

And my build.grade:

buildscript {
    ext {
        buildToolsVersion = "34.0.0"
        minSdkVersion = 21
        compileSdkVersion = 34
        targetSdkVersion = 34

        // We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP.
        ndkVersion = "23.1.7779620"
    }
    repositories {
        google()
        mavenCentral()
    }
    dependencies {
        classpath("com.android.tools.build:gradle:8.1.1")
        classpath("com.facebook.react:react-native-gradle-plugin")
    }
}

Upvotes: 0

Views: 144

Answers (1)

snachmsm
snachmsm

Reputation: 19253

check out merged manifest, it will show all your receivers, also these from libraries. looks like one of them have old code handling some receiver, no exported flag placed... solution would be to update also libraries, at least this problematic one (in merged manifest you will see its package and name)

Upvotes: 0

Related Questions