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

[android] Make build work with instructions in docs #698

Merged
merged 1 commit into from
Oct 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,27 @@ An alternative method to provide access tokens that was required until the v0.7

### SDK Download token

You must also [configure a secret access token having the Download: read
scope][https://docs.mapbox.com/ios/maps/guides/install/]. If this configuration
is not present, an error like the following appears during the iOS build.
You must also configure a secret access token having the *Download: read* scope for
(Android)[https://docs.mapbox.com/android/maps/guides/install/] and/or
(iOS)[https://docs.mapbox.com/ios/maps/guides/install/].

If this configuration is not present, an error like the following appears during
the build process:

#### Android
```
* What went wrong:
A problem occurred evaluating project ':mapbox_gl'.
> SDK Registry token is null. See README.md for more information.
```

#### iOS
```
[!] Error installing Mapbox-iOS-SDK
curl: (22) The requested URL returned error: 401 Unauthorized
```


## Avoid Android UnsatisfiedLinkError

Update buildTypes in `android\app\build.gradle`
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ buildscript {
}

rootProject.allprojects {
def token = System.getenv('SDK_REGISTRY_TOKEN')
def token = System.getenv('SDK_REGISTRY_TOKEN') ?: project.properties['MAPBOX_DOWNLOAD_TOKEN']
if (token == null || token.empty) {
throw new Exception("SDK Registry token is null. See README.md for more information.")
}
Expand Down