Urgent help needed with andriod application

Put problem concerning MapActivities, MapViews, Overlays and GPS in this forum.

Urgent help needed with andriod application

Postby Aisha » Fri Apr 27, 2012 9:35 pm

I am new to Android programming and working on a project in Eclipse.I tried the first tutorial'HelloWorld',and got this error:

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();
   }
}


Aisha
Freshman
Freshman
 
Posts: 2
Joined: Fri Apr 27, 2012 8:22 pm

Top

Return to Map Problems

Who is online

Users browsing this forum: No registered users and 10 guests