Offline map using the ArcGIS android SDK

I am trying to develop an offline maps application using ArcGis android sdk. Follow-up lessons from the ArcGis site. Since this is an offline Maps Applicaion app, I am testing it without an internet connection. But when I run the application, it is MapView

empty. It just shows a black screen. When I checked Logcat it says

11-26 14:39:57.757 28520-28520/com.example.lalprakash.offlinearcgismap D/GLSurfaceView: checkGLSurfaceViewlLogProperty get invalid command
11-26 14:39:57.839 28520-28548/com.example.lalprakash.offlinearcgismap I/System.out: httpget:
11-26 14:39:57.840 28520-28548/com.example.lalprakash.offlinearcgismap I/System.out:
11-26 14:39:57.846 28520-28548/com.example.lalprakash.offlinearcgismap I/System.out: [CDS][DNS]Unable to resolve host "": No address associated with hostname
11-26 14:39:57.846 28520-28548/com.example.lalprakash.offlinearcgismap E/ArcGIS: url =
11-26 14:39:57.884 28520-28520/com.example.lalprakash.offlinearcgismap V/PhoneWindow: DecorView setVisiblity: visibility = 4 ,Parent =null, this$DecorView{41ce4470 I.E..... R.....ID 0,0-0,0}
11-26 14:39:57.891 28520-28520/com.example.lalprakash.offlinearcgismap V/PhoneWindow: DecorView setVisiblity: visibility = 0 ,Parent =ViewRoot{41d35928 com.example.lalprakash.offlinearcgismap/com.example.lalprakash.offlinearcgismap.MainActivity,ident = 0}, this$DecorView{41ce4470 V.E..... R.....ID 0,0-0,0}


I can't figure out where the request is coming from

. My java file and xml file looks like this

public class MainActivity extends Activity {

    MapView mMapView;
    String extern = Environment.getExternalStorageDirectory().getPath();
    final String tpkPath = "/ArcGIS/samples/OfflineRouting/ImageryTPK.tpk";
    TiledLayer mTileLayer;
    GraphicsLayer mGraphicsLayer = new GraphicsLayer(GraphicsLayer.RenderingMode.DYNAMIC);

    RouteTask mRouteTask = null;
    NAFeaturesAsFeature mStops = new NAFeaturesAsFeature();

    Locator mLocator = null;

    protected void onCreate(Bundle savedInstanceState) {

        mTileLayer = new ArcGISLocalTiledLayer(extern + tpkPath);
        // Retrieve the map and initial extent from XML layout
        mMapView = (MapView) findViewById(;

        // Set the tiled map service layer and add a graphics layer




<RelativeLayout xmlns:android=""

        initExtent = "-1.3296373526814876E7 3930962.41823043 -1.2807176545789773E7 4201243.7502468005"
        mapoptions.ZoomLevel="16" />


and the build.gradle looks like this

apply plugin: ''

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"

    defaultConfig {
        applicationId "com.example.lalprakash.offlinearcgismap"
        minSdkVersion 15
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
            jniLibs.srcDir 'src/main/jni'
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), ''

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile ''
    compile ''
    compile files('libs/arcgis-android-api.jar')
    compile files('libs/arcgis-android-app-toolkit.jar')
    compile files('libs/jackson-all-1.9.0.jar')


Also, I placed the file tpk

at the root of my internal memory. Please help me as I need it very badly. Thank.


source to share

1 answer

You can remove initextent and mapoption.maptype from ur XML and tell me what is going on. Havent got a chance to look at ur stack trace but that should show u ur map on ur screen



All Articles