大佬教程收集整理的这篇文章主要介绍了在android上设置Google maps API v2,错误膨胀类片段,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
的.java:
import android.os.bundle; import android.view.Menu; import android.support.v4.app.FragmentActivity; public class GoogleMaps extends FragmentActivity { @Override protected void onCreate(Bundle savedInstanceStatE) { super.onCreate(savedInstanceStatE); setContentView(R.layout.activity_google_maps); } @Override public Boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.google_maps,menu); return true; } }
XML:
<RelativeLayout xmlns:android="http://scheR_968_11845@as.android.com/apk/res/android" xmlns:tools="http://scheR_968_11845@as.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" tools:context=".GoogleMaps" > <fragment android:id="@+id/map" android:layout_width="match_parent" android:layout_height="match_parent" class="com.google.android.gms.maps.SupportMapFragment" android:name="com.tesTing.svma.MainActivity"/> </RelativeLayout>
我想我已经正确设置了Google Play服务,它要求在第一次导航到页面时下载它们.这是我的project.properties:
# Project target. target=android-17 android.library=false android.library.reference.1=../../../android-sdks/extras/google/google_play_services/libproject/google-play-services_lib
原木猫:
... 03-06 21:12:44.751: I/System.out(9122): Debugger has connected 03-06 21:12:44.751: I/System.out(9122): waiTing for debugger to settle... 03-06 21:12:46.166: I/System.out(9122): debugger has settled (1487) 03-06 21:12:50.634: D/dalvikvm(9122): DexOpt: Couldn't find field Landroid/content/res/Configuration;.smallestScreenWidthDp 03-06 21:12:50.634: W/dalvikvm(9122): VFY: unable to resolve instance field 23 03-06 21:12:50.634: D/dalvikvm(9122): VFY: replacing op@R_263_6756@x52 at 0x0012 03-06 21:12:50.634: D/dalvikvm(9122): VFY: dead @R_263_6756@x0014-0018 in Lcom/google/android/gms/common/GooglePlayservicesUtil;.b (Landroid/content/res/resources;)Z 03-06 21:12:51.126: W/dalvikvm(9122): Unable to resolve superclass of Lmaps/p/s; (427) 03-06 21:12:51.126: W/dalvikvm(9122): Link of class 'Lmaps/p/s;' Failed 03-06 21:12:51.126: W/dalvikvm(9122): Unable to resolve superclass of Lmaps/y/bo; (3820) 03-06 21:12:51.126: W/dalvikvm(9122): Link of class 'Lmaps/y/bo;' Failed 03-06 21:12:51.126: W/dalvikvm(9122): Unable to resolve superclass of Lmaps/i/k; (4208) 03-06 21:12:51.126: W/dalvikvm(9122): Link of class 'Lmaps/i/k;' Failed 03-06 21:12:51.126: E/dalvikvm(9122): Could not find class 'maps.i.k',referenced from method maps.z.ag.a 03-06 21:12:51.126: W/dalvikvm(9122): VFY: unable to resolve new-instance 3540 (Lmaps/i/k;) in Lmaps/z/ag; 03-06 21:12:51.126: D/dalvikvm(9122): VFY: replacing op@R_263_6756@x22 at 0x006d 03-06 21:12:51.149: D/dalvikvm(9122): VFY: dead @R_263_6756@x006f-007f in Lmaps/z/ag;.a (Landroid/view/LayoutInflater;Lcom/google/android/gms/maps/GoogleMapOptions;ZLjava/lang/@R_696_10495@ng;)Lmaps/z/ag;
Error inflating class fragment
Google Maps V2 – Error inflating class Fragment
我也只是按照本教程得到了同样的@L_801_4@:
要执行此操作,请右键单击您的项目,然后:
此外,您可以浏览我在您的应用程序中实施Google地图时写的博文:
以上是大佬教程为你收集整理的在android上设置Google maps API v2,错误膨胀类片段全部内容,希望文章能够帮你解决在android上设置Google maps API v2,错误膨胀类片段所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。