#Installing Atlas Android
##Android Studio
After following this guide, you will have the Atlas library, layer-atlas
, imported as a module in your Android Studio project, along with the optional Atlas Messenger module, layer-atlas-messenger
. Building and running Messenger will let you verify that the Layer SDK and Atlas integrations work properly.
-
Add Layer's GitHub Maven repo to your root
build.gradle
(e.g./MyApplication/build.gradle
):allprojects { repositories { maven { url "https://raw.githubusercontent.com/layerhq/releases-android/master/releases/" } } }
-
Add
layer-atlas
project reference to your app'sbuild.gradle
(e.g./MyApplication/app/build.gradle
):dependencies { compile project(':layer-atlas') }
-
Clone this repo as a submodule in the root of your Android Studio project.
git submodule add [email protected]:layerhq/Atlas-Android
Note: If git is not initialized, you may need to
git init
. -
Add
:layer-atlas
module to your project's rootsettings.gradle
(e.g./MyApplication/settings.gradle
):include ':app', ':layer-atlas', ':layer-atlas-messenger' project(':layer-atlas').projectDir = new File('Atlas-Android/layer-atlas') project(':layer-atlas-messenger').projectDir = new File('Atlas-Android/layer-atlas-messenger')
-
Click "Sync Project with Gradle Files" in Android Studio
###Without Git Submodule Follow steps 1 and 2 above, clone this repo somewhere, and...
-
Copy
layer-atlas
to the root of your AndroidStudio project:/MyApplication/layer-atlas
-
Copy
layer-atlas-messenger
to the root of your AndroidStudio project:/MyApplication/layer-atlas-messenger
-
Add
:layer-atlas
and:layer-atlas-messenger
modules to your project's rootsettings.gradle
(e.g./MyApplication/settings.gradle
):include ':app', ':layer-atlas', ':layer-atlas-messenger'
-
Click "Sync Project with Gradle Files" in Android Studio