jyoti
jyoti

Reputation: 1

rnmapbox/maps Error: @rnmapbox/maps native code not available. App Entry not found for react native expo app android platform

@rnmapbox/maps library is not working with a React Native Expo app on the Android platform.
Plugin versions:

Error: @rnmapbox/maps native code not available. Make sure you have linked the library and rebuild your app. See this link.

On the emulator, the error displayed is: "App entry not found."
If I try running with CLI using 'npm run android', it throws the following error:

Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Could not resolve all dependencies for configuration ':app:debugCompileClasspath'.
   > Could not resolve com.mapbox.maps:android:10.18.4.
     Required by:
         project :app
      > Could not resolve com.mapbox.maps:android:10.18.4.
         > Could not get resource 'https://api.mapbox.com/downloads/v2/releases/maven/com/mapbox/maps/android/10.18.4/android-10.18.4.pom'.
            > Could not GET 'https://api.mapbox.com/downloads/v2/releases/maven/com/mapbox/maps/android/10.18.4/android-10.18.4.pom'. Received status code 403 from server: Forbidden

I have followed the Android configuration instructions at this link, but it didn't work.

Upvotes: 0

Views: 74

Answers (1)

Nelloverflow
Nelloverflow

Reputation: 1779

That error is usually caused by a missing / misconfigured sk.. key in your app.{json,config.js,config.ts}'s plugins.

Double check it's properly added to the config plugins:

{
  "expo": {
    "plugins": [
      [
        "@rnmapbox/maps",
        {
          "RNMapboxMapsDownloadToken": "sk.ey.."
        }
      ]
    ]
  }
}

Make sure it has the scope for "DOWNLOADS:READ"

Download scope for mapbox API token

and then rebuild your development client(s)

eas build --profile development --platform android

eas build --profile development-simulator --platform ios

Upvotes: 0

Related Questions