我正在尝试使用Google Play服务API访问Google地图。我从本教程[URL]开始执行每一步:http://www.androidhive.info/2013/08/android-working-with-google-maps-v2/ 。我检查我的代码多次重新检查,这正是[我从本教程中复制],就像本教程一样。但是当我在模拟器和手机中运行时,我的应用程序崩溃了。请参阅教程中给出的代码。这段代码有什么问题,或者我走错了路。如果是这样,请提供其他更好的选择。提前致谢 .. :) 我的logcat就像这样显示了
07-07 07:13:18.050: E/AndroidRuntime(963): FATAL EXCEPTION: main
07-07 07:13:18.050: E/AndroidRuntime(963): Process: com.example.trymap2, PID: 963
07-07 07:13:18.050: E/AndroidRuntime(963): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.trymap2/com.example.trymap2.MainActivity}: android.view.InflateException: Binary XML file line #6: Error inflating class fragment
07-07 07:13:18.050: E/AndroidRuntime(963): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2176)
07-07 07:13:18.050: E/AndroidRuntime(963): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2226)
07-07 07:13:18.050: E/AndroidRuntime(963): at android.app.ActivityThread.access$700(ActivityThread.java:135)
07-07 07:13:18.050: E/AndroidRuntime(963): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1397)
07-07 07:13:18.050: E/AndroidRuntime(963): at android.os.Handler.dispatchMessage(Handler.java:102)
07-07 07:13:18.050: E/AndroidRuntime(963): at android.os.Looper.loop(Looper.java:137)
07-07 07:13:18.050: E/AndroidRuntime(963): at android.app.ActivityThread.main(ActivityThread.java:4998)
07-07 07:13:18.050: E/AndroidRuntime(963): at java.lang.reflect.Method.invokeNative(Native Method)
07-07 07:13:18.050: E/AndroidRuntime(963): at java.lang.reflect.Method.invoke(Method.java:515)
07-07 07:13:18.050: E/AndroidRuntime(963): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
07-07 07:13:18.050: E/AndroidRuntime(963): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)