- Code: Select all
Could not find class 'com.esri.android.map.MapView', referenced from method com.esri.arcgis.android.samples.helloworld.HelloWorldActivity.onCreate
Does there have to be a layout named `MapView`? If so,I do not have in my project. Could you please tell me how can I get it into the project?
I also have all source folders in the project. Even mapview, don't know why it's showing this kind of error. I need help with this project and I need to complete it within a few days,but I;m stuck due to this error and can't proceed.I'm facing this same problem in all my projects, even though every one of them I tried is a sample provided by ArcGIS. I'd appreciate help asap,Please. Thanks
following is the code:
- Code: Select all
package com.esri.arcgis.android.samples.helloworld;
import android.app.Activity;
import android.os.Bundle;
import com.esri.android.map.MapView;
import com.esri.android.map.ags.ArcGISTiledMapServiceLayer;
public class HelloWorldActivity extends Activity {
MapView map = null;
/** Called when the activity is first created. */
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
// Retrieve the map and initial extent from XML layout
map = (MapView)findViewById(R.id.map);
// Add dynamic layer to MapView
map.addLayer(new ArcGISTiledMapServiceLayer("" +
"http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"));
}
protected void onPause() {
super.onPause();
map.pause();
}
protected void onResume() {
super.onResume();
map.unpause();
}
}

