开发者

Android google map error

In my project eclispe does not debug any error ! but when run it's force to stop

this is my logcat any idea !!!

07-08 11:20:41.494: WARN/dalvikvm(735): threadid=1: thread exiting with uncaught exception (group=0x40015560)
07-08 11:20:41.534: ERROR/AndroidRuntime(735): FATAL EXCEPTION: main
07-08 11:20:41.534: ERROR/AndroidRuntime(735): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.remwebdevelopment.maptest/com.remwebdevelopment.maptest.MapTest}: java.lang.ClassNotFoundException: com.remwebdevelopment.maptest.MapTest in loader dalvik.system.PathClassLoader[/system/framework/com.google.android.maps.jar:/data/app/com.remwebdevelopment.maptest-2.apk]
07-08 11:20:41.534: ERROR/AndroidRuntime(735):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1544)
07-08 11:20:41.534: ERROR/AndroidRuntime(735):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1638)
07-08 11:20:41.534: ERROR/AndroidRuntime(735):     at android.app.ActivityThread.access$1500(ActivityThread.java:117)
07-08 11:20:41.534: ERROR/AndroidRuntime(735):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:928)
07-08 11:20:41.534: ERROR/AndroidRuntime(735):     at android.os.Handler.dispatchMessage(Handler.java:99)
07-08 11:20:41.534: ERROR/AndroidRuntime(735):     at android.os.Looper.loop(Looper.java:123)
07-08 11:20:41.534: ERROR/AndroidRuntime(735):     at android.app.ActivityThread.main(ActivityThread.java:3647)
07-08 11:20:41.534: ERROR/AndroidRuntime(735):     at java.lang.reflect.Method.invokeNative(Native Method)
07-08 11:20:41.开发者_如何学C534: ERROR/AndroidRuntime(735):     at java.lang.reflect.Method.invoke(Method.java:507)
07-08 11:20:41.534: ERROR/AndroidRuntime(735):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
07-08 11:20:41.534: ERROR/AndroidRuntime(735):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
07-08 11:20:41.534: ERROR/AndroidRuntime(735):     at dalvik.system.NativeStart.main(Native Method)
07-08 11:20:41.534: ERROR/AndroidRuntime(735): Caused by: java.lang.ClassNotFoundException: com.remwebdevelopment.maptest.MapTest in loader dalvik.system.PathClassLoader[/system/framework/com.google.android.maps.jar:/data/app/com.remwebdevelopment.maptest-2.apk]
07-08 11:20:41.534: ERROR/AndroidRuntime(735):     at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
07-08 11:20:41.534: ERROR/AndroidRuntime(735):     at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
07-08 11:20:41.534: ERROR/AndroidRuntime(735):     at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
07-08 11:20:41.534: ERROR/AndroidRuntime(735):     at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
07-08 11:20:41.534: ERROR/AndroidRuntime(735):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1536)
07-08 11:20:41.534: ERROR/AndroidRuntime(735):     ... 11 more


You have either changed your AndroidManifest.xml to update the application package name without changing the <activity> definition for com.remwebdevelopment.maptest.MapTest or you did not define an <activity> entry for com.remwebdevelopment.maptest.MapTest in your AndroidManifest.xml file.


I had the same problem. My solution (similar to other people's answers) was to use the Manifest editor in eclipse. I just removed the "uses library" entry in the application tab and added it again. It put the node at the bottom of the tree (just before the application tag is closed) and it works now. It used to exist half way up the tree of nodes.

UPDATE

I also found later that I needed to update my project according to this post by running the command android update project -p .


Had this sort of problem today after upgrading to latest ADT/SDK. Also for me the exception was

Unable to instantiate activity

Took me quite a while. Checked that i used google-apis (for maps), uses-library, cleaned the project etc.

Deleting the .project and adding a fresh one (create new android project) finally solved it.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜