title: Android - ArcGIS for MapView in Android Studio
body: <p>I'm trying to use ArcGIS for displaying map in my application. I'm getting the following exception.</p>
  
  <pre><code>04-21 09:47:39.140  12766-12766/com.compo.consumer E/AndroidRuntime﹕ FATAL EXCEPTION: main
  Process: com.compo.consumer, PID: 12766
  java.lang.RuntimeException: Unable to start activity ComponentInfo{com.compo.consumer/com.compo.consumer.activity.MainActivity}: android.view.InflateException: Binary XML file line #7: Error inflating class com.esri.android.map.MapView
          at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195)
          at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
          at android.app.ActivityThread.access$800(ActivityThread.java:135)
          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
          at android.os.Handler.dispatchMessage(Handler.java:102)
          at android.os.Looper.loop(Looper.java:136)
          at android.app.ActivityThread.main(ActivityThread.java:5017)
          at java.lang.reflect.Method.invokeNative(Native Method)
          at java.lang.reflect.Method.invoke(Method.java:515)
          at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
          at dalvik.system.NativeStart.main(Native Method)
   Caused by: android.view.InflateException: Binary XML file line #7: Error inflating class com.esri.android.map.MapView
          at android.view.LayoutInflater.createView(LayoutInflater.java:620)
          at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696)
          at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
          at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
          at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
          at com.compo.consumer.activity.GroupMapFragmentArcGIS.onCreateView(GroupMapFragmentArcGIS.java:104)
          at android.support.v4.app.Fragment.performCreateView(Fragment.java:1500)
          at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:938)
          at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1115)
          at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:682)
          at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1478)
          at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:570)
          at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1171)
          at android.app.Activity.performStart(Activity.java:5241)
          at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2168)
          at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
          at android.app.ActivityThread.access$800(ActivityThread.java:135)
          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
          at android.os.Handler.dispatchMessage(Handler.java:102)
          at android.os.Looper.loop(Looper.java:136)
          at android.app.ActivityThread.main(ActivityThread.java:5017)
          at java.lang.reflect.Method.invokeNative(Native Method)
          at java.lang.reflect.Method.invoke(Method.java:515)
          at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
          at dalvik.system.NativeStart.main(Native Method)
   Caused by: java.lang.reflect.InvocationTargetException
          at java.lang.reflect.Constructor.constructNative(Native Method)
          at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
          at android.view.LayoutInflater.createView(LayoutInflater.java:594)
          at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696)
          at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
          at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
          at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
          at com.compo.consumer.activity.GroupMapFragmentArcGIS.onCreateView(GroupMapFragmentArcGIS.java:104)
          at android.support.v4.app.Fragment.performCreateView(Fragment.java:1500)
          at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:938)
          at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1115)
          at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:682)
          at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1478)
          at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:570)
          at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1171)
          at android.app.Activity.performStart(Activity.java:5241)
          at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2168)
          at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
          at android.app.ActivityThread.access$800(ActivityThread.java:135)
          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
          at android.os.Handler.dispatchMessage(Handler.java:102)
          at android.os.Looper.loop(Looper.java:136)
          at android.app.ActivityThread.main(ActivityThread.java:5017)
          at java.lang.reflect.Method.invokeNative(Native Method)
          at java.lang.reflect.Method.invoke(Method.java:515)
          at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
          at dalvik.system.NativeStart.main(Native Method)
   Caused by: java.lang.UnsatisfiedLinkError: Couldn't load runtimecore_java from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.compo.consumer-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.compo.consumer-1, /vendor/lib, /system/lib]]]: findLibrary returned null
          at java.lang.Runtime.loadLibrary(Runtime.java:358)
          at java.lang.System.loadLibrary(System.java:526)
          at com.esri.core.internal.util.e$1.initialize(Unknown Source)
          at com.esri.android.io.a.a(Unknown Source)
          at com.esri.android.map.MapSurface.&lt;clinit&gt;(Unknown Source)
          at com.esri.android.map.MapView.a(Unknown Source)
          at com.esri.android.map.MapView.&lt;init&gt;(Unknown Source)
          at java.lang.reflect.Constructor.constructNative(Native Method)
          at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
          at android.view.LayoutInflater.createView(LayoutInflater.java:594)
          at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696)
          at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
          at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
          at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
          at com.compo.consumer.activity.GroupMapFragmentArcGIS.onCreateView(GroupMapFragmentArcGIS.java:104)
          at android.support.v4.app.Fragment.performCreateView(Fragment.java:1500)
          at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:938)
          at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1115)
          at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:682)
          at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1478)
          at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:570)
          at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1171)
          at android.app.Activity.performStart(Activity.java:5241)
          at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2168)
          at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
          at android.app.ActivityThread.access$800(ActivityThread.java:135)
          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
          at android.os.Handler.dispatchMessage(Handler.java:102)
          at android.os.Looper.loop(Looper.java:136)
          at android.app.ActivityThread.main(ActivityThread.java:5017)
          at java.lang.reflect.Method.invokeNative(Native Method)
          at java.lang.reflect.Method.invoke(Method.java:515)
          at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
          at dalvik.system.NativeStart.main(Native Method)
  </code></pre>
  
  <p>This is my XML layout:</p>
  
  <pre><code>&lt;FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:orientation="vertical" android:layout_width="match_parent"
  android:layout_height="match_parent"&gt;
  &lt;!-- MapView layout and initial extent --&gt;
   &lt;com.esri.android.map.MapView
      android:id="@+id/my_custom_map"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      initExtent = "-1.3296373526814876E7 3930962.41823043 -1.2807176545789773E7 4201243.7502468005"&gt;
  &lt;/com.esri.android.map.MapView&gt;
  </code></pre>
  
  <p></p>
  
  <p>And this is where I'm initializing the map:</p>
  
  <pre><code>public View onCreateView(LayoutInflater inflater, ViewGroup container,
                           Bundle savedInstanceState) {
      super.onCreateView(inflater,container,savedInstanceState);
      // Inflate the layout for this fragment
      Log.d("ON CREATEVIEW()","ON CREATEVIEW()");
      groupMapFragmentView = inflater.inflate(R.layout.map_arcgis, container, false);
      mapView = (MapView)groupMapFragmentView.findViewById(R.id.my_custom_map);
  
  
      return groupMapFragmentView;
  }
  </code></pre>
  
  <p>My app module's build.gradle:</p>
  
  <pre><code>apply plugin: 'android'
  
  android {
  compileSdkVersion 19
  buildToolsVersion '19.0.1'
  
  defaultConfig {
      minSdkVersion 10
      targetSdkVersion 19
      versionCode 1
      versionName "1.0"
  }
  buildTypes {
      release {
          runProguard false
          proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
      }
  }
  }
  
  dependencies {
  compile 'com.android.support:appcompat-v7:19.1.0'
  compile 'com.android.support:support-v4:19.1.0'
  compile 'com.google.android.gms:play-services:+'
  compile fileTree(dir: 'libs', include: ['*.jar'])
  compile files('libs/arcgis-android-api.jar')
  compile files('libs/jackson-core-lgpl-1.9.5.jar')
  compile files('libs/jackson-mapper-lgpl-1.9.5.jar')
  compile files('libs/jcifs-1.3.17.jar')
  }
  android {
  packagingOptions {
      exclude 'META-INF/LGPL2.1'
      exclude 'META-INF/DEPENDENCIES'
      exclude 'META-INF/NOTICE'
      exclude 'META-INF/LICENSE'
      exclude 'META-INF/LICENSE.txt'
      exclude 'META-INF/NOTICE.txt'
  }
  }
  </code></pre>