谷歌地图API第2类未找到 [英] Google Maps api v2 class not found

查看:113
本文介绍了谷歌地图API第2类未找到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用谷歌地图API V2,一切工作正常。今天早上,我更新了SDK和现在的地图不工作。尝试了很多东西再次导入的lib项目和所有,但似乎没有任何工作。 plz帮助。

这是logcat的输出

  8月五号至16号:53:34.327:E / dalvikvm(3422):找不到类的com.google.android.gms.maps.model.LatLng,从引用方法com.apptree.de_luxe.InfoActivity< clinit>
8月5日至十六号:53:34.327:W / dalvikvm(3422):VFY:无法解析新实例170(LCOM /谷歌/安卓/ GMS /地图/模型/经纬度)在LCOM / apptree / de_luxe / InfoActivity;
8月5日至十六号:53:34.327:D / dalvikvm(3422):VFY:更换运code输入0x22为0x0000
8月5日至十六号:53:34.327:E / dalvikvm(3422):找不到类的com.google.android.gms.maps.model.MarkerOptions,从法com.apptree.de_luxe.InfoActivity.setUpMap引用
8月5日至十六号:53:34.327:W / dalvikvm(3422):VFY:无法解析新的实例172(LCOM /谷歌/安卓/ GMS /地图/模型/ MarkerOptions;)在LCOM / apptree / de_luxe / InfoActivity;
8月5日至十六号:53:34.327:D / dalvikvm(3422):VFY:更换运code输入0x22在为0x0002
8月5日至十六号:53:34.347:E / dalvikvm(3422):找不到类的com.google.android.gms.maps.MapFragment,从法引用com.apptree.de_luxe.InfoActivity.setUpMapIfNeeded
8月5日至十六号:53:34.347:W / dalvikvm(3422):VFY:无法解决入住投169(LCOM /谷歌/安卓/ GMS /地图/ MapFragment;)在LCOM / apptree / de_luxe / InfoActivity;
8月5日至十六号:53:34.357:D / dalvikvm(3422):VFY:在0x000f更换运code为0x1F
8月5日至十六号:53:34.367:D / dalvikvm(3422):DexOpt:无法选择在0x0C的直接调用0x029b在LCOM / apptree / de_luxe / InfoActivity;< clinit>
8月5日至十六号:53:34.367:D / dalvikvm(3422):DexOpt:无法在LCOM / apptree / de_luxe / InfoActivity选择直接调用0x029c在0×04; .setUpMap
8月5日至十六号:53:34.387:W / dalvikvm(3422):异常Ljava /郎/ NoClassDefFoundError的;扔在初始化LCOM / apptree / de_luxe / InfoActivity;
8月5日至十六号:53:34.387:W / dalvikvm(3422):初始化类的newInstance中调用失败(LCOM / apptree / de_luxe / InfoActivity;)
8月5日至十六号:53:34.387:D / AndroidRuntime(3422):关闭虚拟机
8月5日至十六号:53:34.398:W / dalvikvm(3422):主题ID = 1:螺纹退出与未捕获的异常(组= 0x40a71930)
8月5日至十六号:53:34.457:E / AndroidRuntime(3422):致命异常:主要
8月5日至十六号:53:34.457:E / AndroidRuntime(3422):java.lang.ExceptionInInitializerError
8月5日至十六号:53:34.457:E / AndroidRuntime(3422):在java.lang.Class.newInstanceImpl(本机方法)
8月5日至十六号:53:34.457:E / AndroidRuntime(3422):在java.lang.Class.newInstance(Class.java:1319)
8月5日至十六号:53:34.457:E / AndroidRuntime(3422):在android.app.Instrumentation.newActivity(Instrumentation.java:1054)
8月5日至十六号:53:34.457:E / AndroidRuntime(3422):在android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2097)
8月5日至十六号:53:34.457:E / AndroidRuntime(3422):在android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
8月5日至十六号:53:34.457:E / AndroidRuntime(3422):在android.app.ActivityThread.access $ 600(ActivityThread.java:141)
8月5日至十六号:53:34.457:E / AndroidRuntime(3422):在android.app.ActivityThread $ H.handleMessage(ActivityThread.java:1234)
8月5日至十六号:53:34.457:E / AndroidRuntime(3422):在android.os.Handler.dispatchMessage(Handler.java:99)
8月5日至十六号:53:34.457:E / AndroidRuntime(3422):在android.os.Looper.loop(Looper.java:137)
8月5日至十六号:53:34.457:E / AndroidRuntime(3422):在android.app.ActivityThread.main(ActivityThread.java:5041)
8月5日至十六号:53:34.457:E / AndroidRuntime(3422):在java.lang.reflect.Method.invokeNative(本机方法)
8月5日至十六号:53:34.457:E / AndroidRuntime(3422):在java.lang.reflect.Method.invoke(Method.java:511)
8月5日至十六号:53:34.457:E / AndroidRuntime(3422):在com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:793)
8月5日至十六号:53:34.457:E / AndroidRuntime(3422):在com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
8月5日至十六号:53:34.457:E / AndroidRuntime(3422):在dalvik.system.NativeStart.main(本机方法)
8月5日至十六号:53:34.457:E / AndroidRuntime(3422):java.lang.NoClassDefFoundError的:产生的原因com.google.android.gms.maps.model.LatLng
8月5日至十六号:53:34.457:E / AndroidRuntime(3422):在com.apptree.de_luxe.InfoActivity< clinit>(InfoActivity.java:35)
8月5日至十六号:53:34.457:E / AndroidRuntime(3422):15 ...更多
 

解决方案

在Eclipse中去:

项目 - >属性 - >Java构建属性

在排序和导出选项卡我查了我的项目Android的私人图书馆。我也这样做了库项目所引用。这个固定我的课没有发现错误,以下升级到SDK 22。

I am using google maps api v2 and everything was working fine . today morning i updated the sdk and now maps are not working. Tried a lot of things like importing the lib project again and all but nothing seems to work . Plz help.

This is the logcat output

05-16 08:53:34.327: E/dalvikvm(3422): Could not find class  'com.google.android.gms.maps.model.LatLng', referenced from method  com.apptree.de_luxe.InfoActivity.<clinit>
05-16 08:53:34.327: W/dalvikvm(3422): VFY: unable to resolve new-instance 170 (Lcom/google/android/gms/maps/model/LatLng;) in Lcom/apptree/de_luxe/InfoActivity;
05-16 08:53:34.327: D/dalvikvm(3422): VFY: replacing opcode 0x22 at 0x0000
05-16 08:53:34.327: E/dalvikvm(3422): Could not find class 'com.google.android.gms.maps.model.MarkerOptions', referenced from method com.apptree.de_luxe.InfoActivity.setUpMap
05-16 08:53:34.327: W/dalvikvm(3422): VFY: unable to resolve new-instance 172 (Lcom/google/android/gms/maps/model/MarkerOptions;) in Lcom/apptree/de_luxe/InfoActivity;
05-16 08:53:34.327: D/dalvikvm(3422): VFY: replacing opcode 0x22 at 0x0002
05-16 08:53:34.347: E/dalvikvm(3422): Could not find class 'com.google.android.gms.maps.MapFragment', referenced from method com.apptree.de_luxe.InfoActivity.setUpMapIfNeeded
05-16 08:53:34.347: W/dalvikvm(3422): VFY: unable to resolve check-cast 169 (Lcom/google/android/gms/maps/MapFragment;) in Lcom/apptree/de_luxe/InfoActivity;
05-16 08:53:34.357: D/dalvikvm(3422): VFY: replacing opcode 0x1f at 0x000f
05-16 08:53:34.367: D/dalvikvm(3422): DexOpt: unable to opt direct call 0x029b at 0x0c in Lcom/apptree/de_luxe/InfoActivity;.<clinit>
05-16 08:53:34.367: D/dalvikvm(3422): DexOpt: unable to opt direct call 0x029c at 0x04 in Lcom/apptree/de_luxe/InfoActivity;.setUpMap
05-16 08:53:34.387: W/dalvikvm(3422): Exception Ljava/lang/NoClassDefFoundError; thrown while initializing Lcom/apptree/de_luxe/InfoActivity;
05-16 08:53:34.387: W/dalvikvm(3422): Class init failed in newInstance call (Lcom/apptree/de_luxe/InfoActivity;)
05-16 08:53:34.387: D/AndroidRuntime(3422): Shutting down VM
05-16 08:53:34.398: W/dalvikvm(3422): threadid=1: thread exiting with uncaught exception (group=0x40a71930)
05-16 08:53:34.457: E/AndroidRuntime(3422): FATAL EXCEPTION: main
05-16 08:53:34.457: E/AndroidRuntime(3422): java.lang.ExceptionInInitializerError
05-16 08:53:34.457: E/AndroidRuntime(3422):     at java.lang.Class.newInstanceImpl(Native Method)
05-16 08:53:34.457: E/AndroidRuntime(3422):     at java.lang.Class.newInstance(Class.java:1319)
05-16 08:53:34.457: E/AndroidRuntime(3422):     at android.app.Instrumentation.newActivity(Instrumentation.java:1054)
05-16 08:53:34.457: E/AndroidRuntime(3422):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2097)
05-16 08:53:34.457: E/AndroidRuntime(3422):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
05-16 08:53:34.457: E/AndroidRuntime(3422):     at android.app.ActivityThread.access$600(ActivityThread.java:141)
05-16 08:53:34.457: E/AndroidRuntime(3422):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
05-16 08:53:34.457: E/AndroidRuntime(3422):     at android.os.Handler.dispatchMessage(Handler.java:99)
05-16 08:53:34.457: E/AndroidRuntime(3422):     at android.os.Looper.loop(Looper.java:137)
05-16 08:53:34.457: E/AndroidRuntime(3422):     at android.app.ActivityThread.main(ActivityThread.java:5041)
05-16 08:53:34.457: E/AndroidRuntime(3422):     at java.lang.reflect.Method.invokeNative(Native Method)
05-16 08:53:34.457: E/AndroidRuntime(3422):     at java.lang.reflect.Method.invoke(Method.java:511)
05-16 08:53:34.457: E/AndroidRuntime(3422):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
05-16 08:53:34.457: E/AndroidRuntime(3422):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
05-16 08:53:34.457: E/AndroidRuntime(3422):     at dalvik.system.NativeStart.main(Native Method)
05-16 08:53:34.457: E/AndroidRuntime(3422): Caused by: java.lang.NoClassDefFoundError: com.google.android.gms.maps.model.LatLng
05-16 08:53:34.457: E/AndroidRuntime(3422):     at com.apptree.de_luxe.InfoActivity.<clinit>(InfoActivity.java:35)
05-16 08:53:34.457: E/AndroidRuntime(3422):     ... 15 more

解决方案

In Eclipse go to:

"Project" -> "Properties" -> "Java Build Properties"

On the "Order and Export" tab I checked "Android Private Libraries" on my project. I also did this for the library project it references. This fixed my class not found errors following upgrading to SDK 22.

这篇关于谷歌地图API第2类未找到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆