Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

accessToken is required on Android? #1607

Closed
awdhootlele opened this issue May 9, 2019 · 1 comment
Closed

accessToken is required on Android? #1607

awdhootlele opened this issue May 9, 2019 · 1 comment

Comments

@awdhootlele
Copy link

awdhootlele commented May 9, 2019

Hello,

I am using custom styles in my application, so I removed the setAccessToken() call.
Since then, my app started to crash on Android with the error pointing to above call. It seems, on Android, the setAccessToken() is required.

On IOS, app runs properly without the accessToken.

Also, on the mapbox-gl-native repo, the PR to make the accesToken optional has been merged.

Is is possible to make the accessToken optional on Android SDK as well?

Thanks.

btw the error is -
com.mapbox.mapboxsdk.exceptions.MapboxConfigurationException:
Using MapView requires setting a valid access token. Use Mapbox.getInstance(Context context, String accessToken) to provide one.
Please see https://www.mapbox.com/help/create-api-access-token/ to learn how to create one.

@sfratini
Copy link
Collaborator

The current version of the RN repo uses an Android native sdk that is before that PR so yes, it is needed. I understand this will change once v7 drops.

mfazekas pushed a commit to mfazekas/maps that referenced this issue Mar 12, 2022
…bot-npm_and_yarn-babel-plugin-proposal-class-properties-7.16.0

build(deps-dev): bump @babel/plugin-proposal-class-properties from 7.10.4 to 7.16.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants