Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/354.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/185.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ionic-framework/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Android谷歌地图v2在启动时崩溃_Java_Android_Crash_Google Maps Android Api 2 - Fatal编程技术网

Java Android谷歌地图v2在启动时崩溃

Java Android谷歌地图v2在启动时崩溃,java,android,crash,google-maps-android-api-2,Java,Android,Crash,Google Maps Android Api 2,在我支持2.2及更高版本的android应用程序中,我尝试使用谷歌地图api v2 到目前为止,我有: 有人知道问题是什么吗 谢谢 xml 显示 事故日志 12-29 22:44:58.103: E/AndroidRuntime(7331): FATAL EXCEPTION: main 12-29 22:44:58.103: E/AndroidRuntime(7331): java.lang.RuntimeException: Unable to start activity Comp

在我支持2.2及更高版本的android应用程序中,我尝试使用谷歌地图api v2

到目前为止,我有:

有人知道问题是什么吗

谢谢

xml

显示


事故日志

12-29 22:44:58.103: E/AndroidRuntime(7331): FATAL EXCEPTION: main
12-29 22:44:58.103: E/AndroidRuntime(7331): java.lang.RuntimeException: Unable to start activity ComponentInfo{sord.ids_connect/sord.ids_connect.Activity_Map}: android.view.InflateException: Binary XML file line #11: Error inflating class fragment
12-29 22:44:58.103: E/AndroidRuntime(7331):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2110)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2135)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at android.app.ActivityThread.access$700(ActivityThread.java:143)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1241)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at android.os.Handler.dispatchMessage(Handler.java:99)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at android.os.Looper.loop(Looper.java:137)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at android.app.ActivityThread.main(ActivityThread.java:4950)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at java.lang.reflect.Method.invokeNative(Native Method)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at java.lang.reflect.Method.invoke(Method.java:511)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1004)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:771)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at dalvik.system.NativeStart.main(Native Method)
12-29 22:44:58.103: E/AndroidRuntime(7331): Caused by: android.view.InflateException: Binary XML file line #11: Error inflating class fragment
12-29 22:44:58.103: E/AndroidRuntime(7331):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:316)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at android.app.Activity.setContentView(Activity.java:1915)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at sord.ids_connect.Activity_Map.onCreate(Activity_Map.java:18)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at android.app.Activity.performCreate(Activity.java:5177)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2074)
12-29 22:44:58.103: E/AndroidRuntime(7331):     ... 11 more
12-29 22:44:58.103: E/AndroidRuntime(7331): Caused by: java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value.  Expected 4030500 but found 0.  You must have the following declaration within the <application> element:     <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
12-29 22:44:58.103: E/AndroidRuntime(7331):     at com.google.android.gms.common.GooglePlayServicesUtil.n(Unknown Source)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at com.google.android.gms.common.GooglePlayServicesUtil.isGooglePlayServicesAvailable(Unknown Source)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at com.google.android.gms.maps.internal.q.v(Unknown Source)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at com.google.android.gms.maps.internal.q.u(Unknown Source)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at com.google.android.gms.maps.MapsInitializer.initialize(Unknown Source)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at com.google.android.gms.maps.SupportMapFragment$b.cE(Unknown Source)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at com.google.android.gms.maps.SupportMapFragment$b.a(Unknown Source)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at com.google.android.gms.dynamic.a.a(Unknown Source)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at com.google.android.gms.dynamic.a.onInflate(Unknown Source)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at com.google.android.gms.maps.SupportMapFragment.onInflate(Unknown Source)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:290)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:676)
12-29 22:44:58.103: E/AndroidRuntime(7331):     ... 21 more
12-2922:44:58.103:E/AndroidRuntime(7331):致命异常:main
12-29 22:44:58.103:E/AndroidRuntime(7331):java.lang.RuntimeException:无法启动活动组件信息{sord.ids_connect/sord.ids_connect.activity_Map}:android.view.InflateException:二进制XML文件行#11:膨胀类片段时出错
12-29 22:44:58.103:E/AndroidRuntime(7331):在android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2110)
12-29 22:44:58.103:E/AndroidRuntime(7331):位于android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2135)
12-29 22:44:58.103:E/AndroidRuntime(7331):在android.app.ActivityThread.access$700(ActivityThread.java:143)
12-29 22:44:58.103:E/AndroidRuntime(7331):在android.app.ActivityThread$H.handleMessage(ActivityThread.java:1241)
12-29 22:44:58.103:E/AndroidRuntime(7331):在android.os.Handler.dispatchMessage(Handler.java:99)上
12-29 22:44:58.103:E/AndroidRuntime(7331):在android.os.Looper.loop(Looper.java:137)
12-29 22:44:58.103:E/AndroidRuntime(7331):位于android.app.ActivityThread.main(ActivityThread.java:4950)
12-29 22:44:58.103:E/AndroidRuntime(7331):位于java.lang.reflect.Method.Invokenactive(本机方法)
12-29 22:44:58.103:E/AndroidRuntime(7331):位于java.lang.reflect.Method.invoke(Method.java:511)
12-29 22:44:58.103:E/AndroidRuntime(7331):在com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1004)
12-29 22:44:58.103:E/AndroidRuntime(7331):在com.android.internal.os.ZygoteInit.main(ZygoteInit.java:771)
12-29 22:44:58.103:E/AndroidRuntime(7331):在dalvik.system.NativeStart.main(本机方法)
12-29 22:44:58.103:E/AndroidRuntime(7331):由以下原因引起:android.view.InflateException:二进制XML文件行#11:膨胀类片段时出错
12-29 22:44:58.103:E/AndroidRuntime(7331):在android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
12-29 22:44:58.103:E/AndroidRuntime(7331):在android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
12-29 22:44:58.103:E/AndroidRuntime(7331):在android.view.LayoutInflater.inflate(LayoutInflater.java:489)
12-29 22:44:58.103:E/AndroidRuntime(7331):在android.view.LayoutInflater.inflate(LayoutInflater.java:396)
12-29 22:44:58.103:E/AndroidRuntime(7331):在android.view.LayoutInflater.inflate(LayoutInflater.java:352)
12-29 22:44:58.103:E/AndroidRuntime(7331):位于com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:316)
12-29 22:44:58.103:E/AndroidRuntime(7331):位于android.app.Activity.setContentView(Activity.java:1915)
12-29 22:44:58.103:E/AndroidRuntime(7331):在sord.ids\u connect.Activity\u Map.onCreate(Activity\u Map.java:18)
12-29 22:44:58.103:E/AndroidRuntime(7331):在android.app.Activity.performCreate(Activity.java:5177)
12-29 22:44:58.103:E/AndroidRuntime(7331):在android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094)
12-29 22:44:58.103:E/AndroidRuntime(7331):在android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2074)
12-2922:44:58.103:E/AndroidRuntime(7331):。。。还有11个
12-29 22:44:58.103:E/AndroidRuntime(7331):原因:java.lang.IllegalStateException:应用程序的AndroidManifest.xml中的元数据标记没有正确的值。应为4030500,但找到0。元素中必须有以下声明:
12-29 22:44:58.103:E/AndroidRuntime(7331):在com.google.android.gms.common.GooglePlayServicesUtil.n(未知来源)
12-29 22:44:58.103:E/AndroidRuntime(7331):在com.google.android.gms.common.GooglePlayServicesUtil.isGooglePlayServicesAvailable(未知来源)
12-29 22:44:58.103:E/AndroidRuntime(7331):在com.google.android.gms.maps.internal.q.v(未知来源)
12-29 22:44:58.103:E/AndroidRuntime(7331):在com.google.android.gms.maps.internal.q.u(未知来源)
12-29 22:44:58.103:E/AndroidRuntime(7331):在com.google.android.gms.maps.mapsintializer.initialize(未知源)
12-29 22:44:58.103:E/AndroidRuntime(7331):在com.google.android.gms.maps.SupportMapFragment$b.cE(未知来源)
12-29 22:44:58.103:E/AndroidRuntime(7331):在com.google.android.gms.maps.SupportMapFragment$b.a(未知来源)
12-29 22:44:58.103:E/AndroidRuntime(7331):在com.google.android.gms.dynamic.a.a(未知来源)
12-29 22:44:58.103:E/AndroidRuntime(7331):在com.google.android.gms.dynamic.a.onInflate(未知来源)
12-29 22:44:58.103:E/AndroidRuntime(7331):在com.google.android.gms.maps.SupportMapFragment.onInflate(未知来源)
12-29 22:44:58.103:E/AndroidRuntime(7331):位于android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:290)
12-29 22:44:58.103:E/AndroidRuntime(7331):在android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:676)
12-2922:44:58.103:E/AndroidRuntime(7331):。。。还有21个

将其添加到
下方和上方的


日志cat对您来说很清楚,它将问题识别为:

java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value.  Expected 4030500 but found 0.  You must have the following declaration within the <application> element:     <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
java.lang.IllegalStateException:应用程序的AndroidManifest.xml中的元数据标记没有正确的值。应为4030500,但找到0。元素中必须有以下声明:

如果它有效,请通知我,happy programming

将其添加到
下方和上方的


日志cat对您来说很清楚,它将问题识别为:

java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value.  Expected 4030500 but found 0.  You must have the following declaration within the <application> element:     <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
java.lang.IllegalStateException:应用程序的AndroidManifest.xml中的元数据标记
12-29 22:44:58.103: E/AndroidRuntime(7331): FATAL EXCEPTION: main
12-29 22:44:58.103: E/AndroidRuntime(7331): java.lang.RuntimeException: Unable to start activity ComponentInfo{sord.ids_connect/sord.ids_connect.Activity_Map}: android.view.InflateException: Binary XML file line #11: Error inflating class fragment
12-29 22:44:58.103: E/AndroidRuntime(7331):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2110)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2135)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at android.app.ActivityThread.access$700(ActivityThread.java:143)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1241)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at android.os.Handler.dispatchMessage(Handler.java:99)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at android.os.Looper.loop(Looper.java:137)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at android.app.ActivityThread.main(ActivityThread.java:4950)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at java.lang.reflect.Method.invokeNative(Native Method)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at java.lang.reflect.Method.invoke(Method.java:511)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1004)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:771)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at dalvik.system.NativeStart.main(Native Method)
12-29 22:44:58.103: E/AndroidRuntime(7331): Caused by: android.view.InflateException: Binary XML file line #11: Error inflating class fragment
12-29 22:44:58.103: E/AndroidRuntime(7331):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:316)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at android.app.Activity.setContentView(Activity.java:1915)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at sord.ids_connect.Activity_Map.onCreate(Activity_Map.java:18)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at android.app.Activity.performCreate(Activity.java:5177)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2074)
12-29 22:44:58.103: E/AndroidRuntime(7331):     ... 11 more
12-29 22:44:58.103: E/AndroidRuntime(7331): Caused by: java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value.  Expected 4030500 but found 0.  You must have the following declaration within the <application> element:     <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
12-29 22:44:58.103: E/AndroidRuntime(7331):     at com.google.android.gms.common.GooglePlayServicesUtil.n(Unknown Source)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at com.google.android.gms.common.GooglePlayServicesUtil.isGooglePlayServicesAvailable(Unknown Source)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at com.google.android.gms.maps.internal.q.v(Unknown Source)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at com.google.android.gms.maps.internal.q.u(Unknown Source)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at com.google.android.gms.maps.MapsInitializer.initialize(Unknown Source)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at com.google.android.gms.maps.SupportMapFragment$b.cE(Unknown Source)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at com.google.android.gms.maps.SupportMapFragment$b.a(Unknown Source)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at com.google.android.gms.dynamic.a.a(Unknown Source)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at com.google.android.gms.dynamic.a.onInflate(Unknown Source)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at com.google.android.gms.maps.SupportMapFragment.onInflate(Unknown Source)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:290)
12-29 22:44:58.103: E/AndroidRuntime(7331):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:676)
12-29 22:44:58.103: E/AndroidRuntime(7331):     ... 21 more
<meta-data android:name="com.google.android.gms.version" 
android:value="@integer/google_play_services_version" />
java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value.  Expected 4030500 but found 0.  You must have the following declaration within the <application> element:     <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />