0

我创建了一个使用 Google Maps API V2 的应用程序。我的应用程序已在 Sony XS 和 Galaxy Tab 上运行,但无法在 HTC Explorer (Android v 2.3.5) 上运行。

Min sdk 在我的 Manifest 文件中为“8”。

我的日志文件:

07-03 09:05:25.332: D/dalvikvm(2287): DexOpt: couldn't find field Landroid/content/res/Configuration;.smallestScreenWidthDp
07-03 09:05:25.332: W/dalvikvm(2287): VFY: unable to resolve instance field 28
07-03 09:05:25.332: D/dalvikvm(2287): VFY: replacing opcode 0x52 at 0x0012
07-03 09:05:25.332: D/dalvikvm(2287): VFY: dead code 0x0014-0018 in Lcom/google/android/gms/common/GooglePlayServicesUtil;.b (Landroid/content/res/Resources;)Z
07-03 09:05:25.352: W/GooglePlayServicesUtil(2287): Google Play services is missing.
07-03 09:05:25.352: W/GooglePlayServicesUtil(2287): Google Play services is missing.
07-03 09:05:25.362: W/GooglePlayServicesUtil(2287): Google Play services is missing.
07-03 09:05:25.362: W/GooglePlayServicesUtil(2287): Google Play services is missing.
07-03 09:05:25.362: W/GooglePlayServicesUtil(2287): Google Play services is missing.
07-03 09:05:25.392: W/GooglePlayServicesUtil(2287): Google Play services is missing.
07-03 09:05:25.432: D/WindowManagerImpl(2287): addView, new view, mViews[0]: com.android.internal.policy.impl.PhoneWindow$DecorView@4078ae68
07-03 09:05:25.442: D/AndroidRuntime(2287): Shutting down VM
07-03 09:05:25.442: W/dalvikvm(2287): threadid=1: thread exiting with uncaught exception (group=0x402445a0)
07-03 09:05:25.442: E/AndroidRuntime(2287): FATAL EXCEPTION: main
07-03 09:05:25.442: E/AndroidRuntime(2287): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.binhanh.fasttaxi/com.binhanh.fasttaxi.FastTaxiActivivty}: java.lang.NullPointerException: IBitmapDescriptorFactory is not initialized
07-03 09:05:25.442: E/AndroidRuntime(2287):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1872)
07-03 09:05:25.442: E/AndroidRuntime(2287):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1893)
07-03 09:05:25.442: E/AndroidRuntime(2287):     at android.app.ActivityThread.access$1500(ActivityThread.java:135)
07-03 09:05:25.442: E/AndroidRuntime(2287):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1054)
07-03 09:05:25.442: E/AndroidRuntime(2287):     at android.os.Handler.dispatchMessage(Handler.java:99)
07-03 09:05:25.442: E/AndroidRuntime(2287):     at android.os.Looper.loop(Looper.java:150)
07-03 09:05:25.442: E/AndroidRuntime(2287):     at android.app.ActivityThread.main(ActivityThread.java:4389)
07-03 09:05:25.442: E/AndroidRuntime(2287):     at java.lang.reflect.Method.invokeNative(Native Method)
07-03 09:05:25.442: E/AndroidRuntime(2287):     at java.lang.reflect.Method.invoke(Method.java:507)
07-03 09:05:25.442: E/AndroidRuntime(2287):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:849)
07-03 09:05:25.442: E/AndroidRuntime(2287):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:607)
07-03 09:05:25.442: E/AndroidRuntime(2287):     at dalvik.system.NativeStart.main(Native Method)
07-03 09:05:25.442: E/AndroidRuntime(2287): Caused by: java.lang.NullPointerException: IBitmapDescriptorFactory is not initialized
07-03 09:05:25.442: E/AndroidRuntime(2287):     at com.google.android.gms.internal.x.b(Unknown Source)
07-03 09:05:25.442: E/AndroidRuntime(2287):     at com.google.android.gms.maps.model.BitmapDescriptorFactory.aW(Unknown Source)
07-03 09:05:25.442: E/AndroidRuntime(2287):     at com.google.android.gms.maps.model.BitmapDescriptorFactory.fromResource(Unknown Source)
07-03 09:05:25.442: E/AndroidRuntime(2287):     at com.binhanh.gmap.ManagerMap.<init>(ManagerMap.java:136)
07-03 09:05:25.442: E/AndroidRuntime(2287):     at com.binhanh.fasttaxi.FastTaxiActivivty.onCreate(FastTaxiActivivty.java:54)
07-03 09:05:25.442: E/AndroidRuntime(2287):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1072)
07-03 09:05:25.442: E/AndroidRuntime(2287):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1836)
07-03 09:05:25.442: E/AndroidRuntime(2287):     ... 11 more
4

1 回答 1

0

我在以下位置找到了解决方案:

Google Maps Android API v2 抛出 GooglePlayServicesNotAvailableException,过期,SupportMapFragment.getMap() 返回 null

错误原因:我的手机是新设备,没有更新上一次GooglePlayService。

感谢您的支持,

于 2013-07-05T08:37:27.593 回答