diff options
Diffstat (limited to 'platform/android/README.md')
-rw-r--r-- | platform/android/README.md | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/platform/android/README.md b/platform/android/README.md index 0f6998f1a3..3ce66526c2 100644 --- a/platform/android/README.md +++ b/platform/android/README.md @@ -14,6 +14,36 @@ Alright. So, actually, you may be in the wrong place. From here on in, this READ [![](https://www.mapbox.com/android-sdk/images/splash.png)](https://www.mapbox.com/android-sdk/) +#### Opening the project in Android Studio + +We recommend that you open this repository's `android` folder in Android Studio. + +mapbox-gl-native > platform > android + +Once you open it in Android Studio and switch to the Android view in the left-hand sidebar, you should see the `MapboxGLAndroidSDK` and `MapboxGLAndroidSDKTestApp` folders. + +Alternatively, you can use the Terminal application to open the project in Android Studio. Open your Terminal application, navigate to this repository's root folder, and run the `make aproj` command. + +#### Using the SDK snapshot + +Instead of using the latest stable release of the Mapbox Android SDK, you can use a "snapshot" or the beta version if there is one available. Our snapshots are built every time a Github pull request adds code to this repository's `master` branch. If you'd like to use a snapshot build, your Android project's gradle file should have -SNAPSHOT appended to the SDK version number. For example `5.2.0-SNAPSHOT` or: + +```java +// Mapbox SDK dependency + compile('com.mapbox.mapboxsdk:mapbox-android-sdk:5.2.0-SNAPSHOT@aar') { + transitive = true + } +``` +You need to have the section below in your build.gradle root folder to be able to resolve the SNAPSHOT dependencies: +``` +allprojects { + repositories { + jcenter() + maven { url "http://oss.sonatype.org/content/repositories/snapshots/" } + } +} +``` + ### Setup environment **These instructions are for developers interested in making code-level contributions to the SDK itself. If you instead want to use the SDK in your app, see above.** @@ -64,8 +94,6 @@ $ sudo apt-get install -y build-essential curl lib32stdc++6 lib32z1 pkg-config p - [xcpretty](https://github.com/supermarin/xcpretty) (`gem install xcpretty`) -#### Open project in Android Studio - ##### macOS Execute the following to generate the required build files and open the project with Android Studio: |