Класс не найден, исключение - PullRequest
0 голосов
/ 01 марта 2011

В моем приложении для Android я использовал карту Google. Я использую устройство Android 1.6. Это приложение отлично работает на эмуляторе и устройстве Android2.2. Когда я использую это приложение в Android 1.6, то оно показывает исключение

java.lang.ClassNotFoundException

Пожалуйста, пришлите решение для этого.

<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"
/>

это показывает ошибку на super.onCreate (saveInstanceState); эта строка

Это событие клика, откуда я вызываю карту.

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()));
                intenRetailerLocation.putExtra("Adress", o.getAddress());
                intenRetailerLocation.putExtra("zip", o.getZip());
                intenRetailerLocation.putExtra("city", o.getCity());
                intenRetailerLocation.putExtra("Description", o
                        .getDescription());
                startActivity(intenRetailerLocation);
                finish();

            }

        });

Класс, в котором используется карта Google

@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);

1 Ответ

1 голос
/ 23 мая 2011

Убедитесь, что действие, в котором вы используете Карты Google, расширяет com.google.android.maps.MapActivity.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...