2

I'm trying to use ArcGis with Android Studio. I tried to follow these steps

but I face this error :

Error:Execution failed for task ':app:dexDebug'. com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.7.0_67.jdk/Contents/Home/bin/java'' finished with non-zero exit value 2

My app structure

enter image description here

app : build.gradle

  // Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.1.0'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
        // Add the following arcgis repository
        maven {
            url 'http://dl.bintray.com/esri/arcgis'
        }
    }
}
Daniel A. González
  • 1,185
  • 7
  • 11
ahmed Shoeib
  • 254
  • 5
  • 22
  • That is your parent build.gradle. Can you also include the one in app/build.gradle? – Daniel A. González Apr 08 '15 at 20:44
  • you can check the image in the post + the listed build.gradle – ahmed Shoeib Apr 08 '15 at 23:32
  • 1
    If you take out the ArcGIS dependency and related code, does it work? – Daniel A. González Apr 09 '15 at 01:52
  • After taking the dependency out the app compiled but not run , check this error DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.testarcgis" pkg: /data/local/tmp/com.testarcgis Failure [INSTALL_FAILED_CPU_ABI_INCOMPATIBLE] – ahmed Shoeib Apr 09 '15 at 08:42
  • Thanks @ Daniel A. González , it's working now on Device , the above exception throws when running the app on genymotion. – ahmed Shoeib Apr 09 '15 at 11:10
  • Can you support me how to fix this issue on genymotion ? – ahmed Shoeib Apr 09 '15 at 11:29
  • I am not sure, you might want to create a new question for that. However, CPU ABI incompatible means that you are trying to use, for example, an x86 app in a arm emulator, so make sure they match. Not sure how you would do so though. – Daniel A. González Apr 09 '15 at 14:07
  • A quick Google search gave me this: http://stackoverflow.com/a/27700397/2245921 Basically I assume you added some libraries (JARs or .so native C libraries) that are not compiled for all the architectures that you are trying to support. Refer to that question for more details. – Daniel A. González Apr 09 '15 at 14:18
  • No problem! If your question is answered, please mark my answer as the correct one. :) – Daniel A. González Apr 10 '15 at 15:44

1 Answers1

2

It seems like my comments above answered the question.

Daniel A. González
  • 1,185
  • 7
  • 11