summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom MacWright <tom@macwright.org>2015-12-15 11:10:18 -0500
committerTom MacWright <tom@macwright.org>2015-12-15 11:10:18 -0500
commit999447587cc2175f23fc146db74f90f73088b11e (patch)
tree258c84d817b320e470a5fed942479f5ff1be3777
parente81f3f3735bb04e2a893acc2607ef4530bde6888 (diff)
downloadqtlocation-mapboxgl-999447587cc2175f23fc146db74f90f73088b11e.tar.gz
Expand DEVELOP_ANDROID_OSX with more gotchas.
Fixes #3266
-rw-r--r--docs/DEVELOP_ANDROID_OSX.md20
1 files changed, 17 insertions, 3 deletions
diff --git a/docs/DEVELOP_ANDROID_OSX.md b/docs/DEVELOP_ANDROID_OSX.md
index 380313aaa8..2992e8f727 100644
--- a/docs/DEVELOP_ANDROID_OSX.md
+++ b/docs/DEVELOP_ANDROID_OSX.md
@@ -8,8 +8,10 @@ Install Oracle JDK 7+ and Android Studio:
brew cask install android-studio
+You can [download Android Studio instead of installing it with Homebrew, but you'll still need to `brew install java`](https://developer.android.com/sdk/index.html)
+for it to work.
-Once Android Studio is downloaded and installed, the [first time it's run it'll ask to install the Android SDK](http://developer.android.com/sdk/installing/index.html?pkg=studio) which you should do. While doing so in the Android SDK Manager make sure to also select and install the latest versions of "Android Support Repository" and "Android Support Library" from "Extras":
+Once Android Studio is installed, the [first time it's run it'll ask to install the Android SDK](http://developer.android.com/sdk/installing/index.html?pkg=studio) which you should do. While doing so in the Android SDK Manager make sure to also select and install the latest versions of "Android Support Repository" and "Android Support Library" from "Extras":
![image](https://cloud.githubusercontent.com/assets/98601/9915837/289f398e-5c6e-11e5-9a84-ed4d08d52d1f.png)
@@ -19,11 +21,12 @@ By default, the Android SDK will be installed to `/Users/<user>/Library/Android/
_The test application (used for development purposes) uses Mapbox vector tiles, which require a Mapbox account and API access token. Obtain a free access token on the [Mapbox account page](https://www.mapbox.com/studio/account/tokens/)._
-gradle will take the value of the `MAPBOX_ACCESS_TOKEN` environ variable and save it to `MapboxGLAndroidSDKTestApp/src/main/res/values/developer-config.xml` where the app will read it from.
+If you start Android Studio from your terminal, gradle will take the value of the `MAPBOX_ACCESS_TOKEN` environment variable and save it to `MapboxGLAndroidSDKTestApp/src/main/res/values/developer-config.xml` where the app will read it from. Otherwise,
+you can edit `developer-config.xml` and add the value manually.
## Developing In Android Studio
-To work with the Mapbox Android SDK, you'll first need to get it setup as a Project in Android Studio. To do so Open Android Studio and select "Import project (Eclipse ADT, Gradle, etc.)" from the Welcome to Android Studio dialog. From there select the `android` directory from the local file system where `mapbox-gl-native` was cloned. For example:
+To work with the Mapbox Android SDK, you'll first need to get it set up as a Project in Android Studio. To do so Open Android Studio and select "Import project (Eclipse ADT, Gradle, etc.)" from the Welcome to Android Studio dialog. From there select the `android` directory from the local file system where `mapbox-gl-native` was cloned. For example:
```sh
/Users/<user>/development/mapbox-gl-native/android
@@ -31,6 +34,17 @@ To work with the Mapbox Android SDK, you'll first need to get it setup as a Proj
The Mapbox Android SDK is a multi-module Gradle based project. Specifically, the SDK itself is an [Android Library](http://developer.android.com/tools/projects/index.html#LibraryModules) module and it utilizes a companion [test module](http://developer.android.com/tools/projects/index.html#testing) (aka "the TestApp") for daily development. When Android Studio finishes importing the project both `MapboxGLAndroidSDK` and `MapboxGLAndroidSDKTestApp` modules should be visible.
+## Setting `ANDROID_HOME`
+
+For `build android` to work, you'll need to set the `ANDROID_HOME` environment
+to point to your Android SDK installation:
+
+```
+export ANDROID_HOME=/<installation location>/android-sdk-macosx
+```
+
+This environment variable configuration should go into a file that's read on
+your shell's startup, like `~/.profile`.
## Running The TestApp