开发者

google map problem in android

开发者 https://www.devze.com 2023-02-28 08:04 出处:网络
hi i made google map applicationbut when i call the class in which i made th MapActivity following error are generated

hi i made google map application but when i call the class in which i made th MapActivity following error are generated

AndroidRuntime  FATAL EXCEPTION: main
    ERROR   AndroidRuntime  java.lang.NoClassDefFoundError: org.me.bdn.MapDemo
    936 ERROR   AndroidRuntime      at org.me.bdn.listdata$1.onItemClick(listdata.java:53)
    936 ERROR   AndroidRuntime      at android.widget.AdapterView.performItemClick(AdapterView.java:284)
    936 ERROR   AndroidRuntime      at android.widget.ListView.performItemClick(ListView.java:3382)
14:02:25.856    936 ERROR   AndroidRuntime      at android.widget.AbsListView$PerformClick.run(AbsListView.java:1696)
14:02:25.856    936 ERROR   AndroidRuntime      at android.os.Handler.handleCallback(Handler.java:587)
14:02:25.856    936 ERROR   AndroidRuntime      at android.os.Handler.dispatchMessage(Handler.java:92)
14:02:25.856    936 ERROR   AndroidRuntime      at android.os.Looper.loop(Looper.java:123)
14:02:25.856    936 ERROR   AndroidRuntime      at android.app.ActivityThread.main(ActivityThread.java:4627)
14:02:25.856    936 ERROR   AndroidRuntime      at java.lang.reflect.开发者_开发技巧Method.invokeNative(Native Method)
14:02:25.856    936 ERROR   AndroidRuntime      at java.lang.reflect.Method.invoke(Method.java:521)
14:02:25.856    936 ERROR   AndroidRuntime      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
14:02:25.856    936 ERROR   AndroidRuntime      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
14:02:25.856    936 ERROR   AndroidRuntime      at dalvik.system.NativeStart.main(Native Method)


my MapActivity class is given here

import android.os.Bundle;
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapView;

/**
 *
 * @author bhaveshn
 */
public class MapDemo  extends MapActivity{

    @Override
    protected boolean isRouteDisplayed() {
         return false;

    }

    @Override
    protected void onCreate(Bundle vi) {
        super.onCreate(vi);
        setContentView(R.layout.map);
        MapView mapView = (MapView) findViewById(R.id.mapview);
    mapView.setBuiltInZoomControls(true);
    }


}

i have already added the this file in menifest file

<?xml version="1.0" encoding="UTF-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="org.me.bdn">
        <uses-permission android:name="android.permission.INTERNET" />   
<application android:icon="@drawable/icon" >
        <activity android:name=".MapDemo" android:label="Map">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>


 <uses-library android:name="com.google.android.maps" />
    </application>


Have you write this permission

 <uses-permission android:name="android.permission.INTERNET" />

 <uses-library android:name="com.google.android.maps"/>
0

精彩评论

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