0

我正在开发一个显示谷歌地图的安卓应用程序。我的日志猫显示以下错误。我是android开发的新手。请帮帮我。谢谢

03-06 06:31:25.561: E/dalvikvm(2476): Could not find class 'com.example.mapdemo.BasicMapActivity', referenced from method com.example.mapdemo.MainActivity.<clinit>
03-06 06:31:26.253: E/AndroidRuntime(2476): FATAL EXCEPTION: main
03-06 06:31:26.253: E/AndroidRuntime(2476): java.lang.ExceptionInInitializerError
03-06 06:31:26.253: E/AndroidRuntime(2476):     at java.lang.Class.newInstanceImpl(Native Method)
03-06 06:31:26.253: E/AndroidRuntime(2476):     at java.lang.Class.newInstance(Class.java:1319)
03-06 06:31:26.253: E/AndroidRuntime(2476):     at android.app.Instrumentation.newActivity(Instrumentation.java:1054)
03-06 06:31:26.253: E/AndroidRuntime(2476):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2097)
03-06 06:31:26.253: E/AndroidRuntime(2476):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
03-06 06:31:26.253: E/AndroidRuntime(2476):     at android.app.ActivityThread.access$600(ActivityThread.java:141)
03-06 06:31:26.253: E/AndroidRuntime(2476):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
03-06 06:31:26.253: E/AndroidRuntime(2476):     at android.os.Handler.dispatchMessage(Handler.java:99)
03-06 06:31:26.253: E/AndroidRuntime(2476):     at android.os.Looper.loop(Looper.java:137)
03-06 06:31:26.253: E/AndroidRuntime(2476):     at android.app.ActivityThread.main(ActivityThread.java:5041)
03-06 06:31:26.253: E/AndroidRuntime(2476):     at java.lang.reflect.Method.invokeNative(Native Method)
03-06 06:31:26.253: E/AndroidRuntime(2476):     at java.lang.reflect.Method.invoke(Method.java:511)
03-06 06:31:26.253: E/AndroidRuntime(2476):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
03-06 06:31:26.253: E/AndroidRuntime(2476):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
03-06 06:31:26.253: E/AndroidRuntime(2476):     at dalvik.system.NativeStart.main(Native Method)
03-06 06:31:26.253: E/AndroidRuntime(2476): Caused by: java.lang.NoClassDefFoundError: com.example.mapdemo.BasicMapActivity
03-06 06:31:26.253: E/AndroidRuntime(2476):     at com.example.mapdemo.MainActivity.<clinit>(MainActivity.java:98)
03-06 06:31:26.253: E/AndroidRuntime(2476):     ... 15 more
4

2 回答 2

0

You should include this<uses-library android:name="com.google.android.maps" /> in your application tag in the manifest and also include this permissions

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
于 2013-03-06T06:55:00.843 回答
0
  1. Check if you have defined your activity "BasicMapActivity".
  2. Check if it has also being included in the manifest.xml
于 2013-03-06T06:56:45.847 回答