1

Has anyone got the ArcGIS SDK from Esri to work with Android Studio(gradle)?. So far I have the done the following

  1. Extracted the ArcGIS Android SDK(10.2.2).

  2. Added the .so files (armeabi-v7a & x86) to the jniLibs folder as per this guide http://ph0b.com/android-studio-gradle-and-ndk-integration/

  3. Added arcgis-android-api.jar, arcgis-android-app-toolkit.jar, jackson-core-lgpl-1.9.5.jar, jackson-mapper-lgpl-1.9.5 and jcifs-1.3.17.jar to the libs folder

Here is my gradle file

buildscript {
repositories {
    mavenCentral()
}
dependencies {
    classpath 'com.android.tools.build:gradle:0.9.+'
}
}
apply plugin: 'android'

repositories {
mavenCentral()
}

android {
compileSdkVersion 19
buildToolsVersion "19.0.3"

defaultConfig {
    minSdkVersion 16
    targetSdkVersion 19
}

productFlavors {


    armv7 {
        ndk {
            abiFilter "armeabi-v7a"
        }
    }

    x86 {
        ndk {
            abiFilter "x86"
        }
    }


}




packagingOptions {

    exclude 'META-INF/LICENSE'
    exclude 'META-INF/LGPL2.1'
    exclude 'META-INF/NOTICE'
    exclude 'META-INF/license.txt'
    exclude 'META-INF/notice.txt'

}

}

A Screenshot of my Project Structure

Here is a screenshot of my project structure

The gradle file compiles successfully but when I run the application it crashes with the following error

Caused by: java.lang.NoSuchMethodError: no method with name='requestRender' signature='(Z)V' in class Lcom/esri/android/map/MapSurface

Am I missing something here?

2

Your are not loading the *.jar dependencies in your build:

dependencies { // local binary dependency compile fileTree(dir: 'libs', include: ['*.jar']) }

We now have EAP release of ArcGIS Runtime SDK for Android samples here and the v10.2.3 EAP library module here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.