开发者

Class not found exception

In my android application i have used the google map. I have using android device 1.6. This application will perfectly run on emulator and android2.2 device. When i use this application in android 1.6 then it shows an exception

java.lang.ClassNotFoundException

Please send the solution for this.

<com.google.android.maps.MapView
android:id="@+id/mMapView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:clickable="true"
android:apiKey="0Ch_WE9h_nEOXJcdEm1UmEVnZjFsenqLslkrGyA"
/>

it shows an error on super.onCreate(savedInstanceState); this line

This is click event from where i call map.

mListView.setOnItemClickListener(new OnItemClickListener()
        {
            public void onItemClick(AdapterView<?> parent, View v,
                    int position, long id)
            {
                ParsedData o = Retailerdata.get(position);

                Intent intenRetailerLocation = new Intent(
                        RetailerListing.this, RetailerLocation.class);
                intenRetailerLocation.putExtra("Lat", Float.valueOf(o
                        .getLat()));
                intenRetailerLocation.putExtra("long", Float.valueOf(o
                        .getLong()));
  开发者_如何学JAVA              intenRetailerLocation.putExtra("Adress", o.getAddress());
                intenRetailerLocation.putExtra("zip", o.getZip());
                intenRetailerLocation.putExtra("city", o.getCity());
                intenRetailerLocation.putExtra("Description", o
                        .getDescription());
                startActivity(intenRetailerLocation);
                finish();

            }

        });

Class in which use the google map

@Override
public void onCreate(Bundle savedInstanceState) 
{ 
    super.onCreate(savedInstanceState);// Error comes on this line      
        setContentView(R.layout.retailerlocation);

        myLayout=(RelativeLayout)findViewById(R.id.MyLayout);
        mImageView = (ImageView) findViewById(R.id.picture);
        mContainer = (ViewGroup) findViewById(R.id.container);

    topTitle=(TextView)findViewById(R.id.SelectedGameName);
    mMapView = (MapView) findViewById(R.id.mMapView);
    mMapView.setTraffic(false);
    mMapView.setStreetView(false); 
    mMapView.setSatellite(false);

    mMapView.setBuiltInZoomControls(true);


Make sure that the Activity in which you use the Google Maps extends the com.google.android.maps.MapActivity.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜