我正在尝试在 SDK 版本 10 上创建 MapView,但如何创建 MapView 的所有示例都使用Fragments,这仅在 API 11 中。
https://developers.google.com/maps/documentation/android/map#add_a_map_to_an_android_application
我不想添加额外的支持库。
我能够加载应用程序,但地图显示为空的灰色网格。这些在日志文件中显示为唯一的半相关行:
03-08 23:20:25.088: W/dalvikvm(32615): VFY: unable to resolve instance field 23
03-08 23:20:25.088: D/dalvikvm(32615): VFY: replacing opcode 0x52 at 0x0012
03-08 23:20:25.088: D/dalvikvm(32615): VFY: dead code 0x0014-0018 in Lcom/google/android/gms/common/GooglePlayServicesUtil;.b (Landroid/content/res/Resources;)Z
03-08 23:20:25.213: D/dalvikvm(32615): GC_CONCURRENT freed 1276K, 48% free 3765K/7175K, external 9476K/10157K, paused 5ms+8ms
03-08 23:20:25.236: I/dalvikvm(32615): Total arena pages for JIT: 11
03-08 23:20:25.541: W/dalvikvm(32615): Unable to resolve superclass of Lmaps/p/s; (427)
03-08 23:20:25.541: W/dalvikvm(32615): Link of class 'Lmaps/p/s;' failed
03-08 23:20:25.541: W/dalvikvm(32615): Unable to resolve superclass of Lmaps/y/bo; (3820)
03-08 23:20:25.541: W/dalvikvm(32615): Link of class 'Lmaps/y/bo;' failed
03-08 23:20:25.541: W/dalvikvm(32615): Unable to resolve superclass of Lmaps/i/k; (4208)
03-08 23:20:25.541: W/dalvikvm(32615): Link of class 'Lmaps/i/k;' failed
03-08 23:20:25.541: E/dalvikvm(32615): Could not find class 'maps.i.k', referenced from method maps.z.ag.a
03-08 23:20:25.541: W/dalvikvm(32615): VFY: unable to resolve new-instance 3540 (Lmaps/i/k;) in Lmaps/z/ag;
03-08 23:20:25.541: D/dalvikvm(32615): VFY: replacing opcode 0x22 at 0x006d
03-08 23:20:25.627: D/dalvikvm(32615): VFY: dead code 0x006f-007f in Lmaps/z/ag;.a (Landroid/view/LayoutInflater;Lcom/google/android/gms/maps/GoogleMapOptions;ZLjava/lang/String;)Lmaps/z/ag;
03-08 23:20:26.275: D/MPAY(32615): map = com.google.android.gms.maps.GoogleMap@40718398