Rebuild ArcGIS Android Samples with Kotlin
ArcGIS Runtime SDK for Android v100.0.0 samples. The master
branch of this repository contains sample app modules for the latest available version of the ArcGIS Runtime SDK for Android. Samples released under older versions can be found through the repository releases.
compileSdkVersion 25
which requires Kotlin 1.1.2-4The ArcGIS Android SDK Samples are Gradle based Android projects which can be directly cloned and imported into Android Studio.
The latest ArcGIS Android SDK compile dependency is defined for all sample modules in the root project build.gradle. This is the only place where you need to define the dependency to the ArcGIS Android SDK.
subprojects{
afterEvaluate {project ->
if(project.hasProperty("dependencies")){
dependencies {
compile 'com.esri.arcgisruntime:arcgis-android:100.0.0'
compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
}
}
}
}
Our SDK is hosted in our public maven repository hosted by Bintray. Our repository url is added to the projects root build.gradle file.
repositories {
jcenter()
maven {
url 'https://esri.bintray.com/arcgis'
}
}
See the project's build.gradle and app's build.gradle.
If you haven’t already, fork the this repo.
Clone the ArcGIS Android SDK Samples in Android Studio:
NOTE: Do not import the project into Android Studio. There is an outstanding issue in Android Studio that requires importing the project in the steps defined below.
Once the project is cloned to disk you can import into Android Studio:
You should now be able to run any of the included samples. We will use the set-map-initial-location
sample as an example.
set-map-initial-location
from the Select Run/Debug Configuration drop down