12-21 02:04:02.430: E/AndroidRuntime(1690): FATAL EXCEPTION: main
12-21 02:04:02.430: E/AndroidRuntime(1690): Process: com.example.main, PID: 1690
12-21 02:04:02.430: E/AndroidRuntime(1690): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.main/com.example.main.ShowRouteMap}: android.view.InflateException: Binary XML file line #66: Error inflating class fragment
12-21 02:04:02.430: E/AndroidRuntime(1690): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2176)
12-21 02:04:02.430: E/AndroidRuntime(1690): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2226)
12-21 02:04:02.430: E/AndroidRuntime(1690): at android.app.ActivityThread.access$700(ActivityThread.java:135)
12-21 02:04:02.430: E/AndroidRuntime(1690): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1397)
12-21 02:04:02.430: E/AndroidRuntime(1690): at android.os.Handler.dispatchMessage(Handler.java:102)
12-21 02:04:02.430: E/AndroidRuntime(1690): at android.os.Looper.loop(Looper.java:137)
12-21 02:04:02.430: E/AndroidRuntime(1690): at android.app.ActivityThread.main(ActivityThread.java:4998)
12-21 02:04:02.430: E/AndroidRuntime(1690): at java.lang.reflect.Method.invokeNative(Native Method)
12-21 02:04:02.430: E/AndroidRuntime(1690): at java.lang.reflect.Method.invoke(Method.java:515)
12-21 02:04:02.430: E/AndroidRuntime(1690): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
12-21 02:04:02.430: E/AndroidRuntime(1690): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
12-21 02:04:02.430: E/AndroidRuntime(1690): at dalvik.system.NativeStart.main(Native Method)
12-21 02:04:02.430: E/AndroidRuntime(1690): Caused by: android.view.InflateException: Binary XML file line #66: Error inflating class fragment
12-21 02:04:02.430: E/AndroidRuntime(1690): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:713)
12-21 02:04:02.430: E/AndroidRuntime(1690): at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
12-21 02:04:02.430: E/AndroidRuntime(1690): at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
12-21 02:04:02.430: E/AndroidRuntime(1690): at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
12-21 02:04:02.430: E/AndroidRuntime(1690): at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
12-21 02:04:02.430: E/AndroidRuntime(1690): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:290)
12-21 02:04:02.430: E/AndroidRuntime(1690): at android.app.Activity.setContentView(Activity.java:1928)
12-21 02:04:02.430: E/AndroidRuntime(1690): at com.example.main.ShowRouteMap.onCreate(ShowRouteMap.java:19)
12-21 02:04:02.430: E/AndroidRuntime(1690): at android.app.Activity.performCreate(Activity.java:5243)
12-21 02:04:02.430: E/AndroidRuntime(1690): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
12-21 02:04:02.430: E/AndroidRuntime(1690): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2140)
12-21 02:04:02.430: E/AndroidRuntime(1690): ... 11 more
12-21 02:04:02.430: E/AndroidRuntime(1690): 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-21 02:04:02.430: E/AndroidRuntime(1690): at com.google.android.gms.common.GooglePlayServicesUtil.n(Unknown Source)
12-21 02:04:02.430: E/AndroidRuntime(1690): at com.google.android.gms.common.GooglePlayServicesUtil.isGooglePlayServicesAvailable(Unknown Source)
12-21 02:04:02.430: E/AndroidRuntime(1690): at com.google.android.gms.maps.internal.q.v(Unknown Source)
12-21 02:04:02.430: E/AndroidRuntime(1690): at com.google.android.gms.maps.internal.q.u(Unknown Source)
12-21 02:04:02.430: E/AndroidRuntime(1690): at com.google.android.gms.maps.MapsInitializer.initialize(Unknown Source)
12-21 02:04:02.430: E/AndroidRuntime(1690): at com.google.android.gms.maps.SupportMapFragment$b.cE(Unknown Source)
12-21 02:04:02.430: E/AndroidRuntime(1690): at com.google.android.gms.maps.SupportMapFragment$b.a(Unknown Source)
12-21 02:04:02.430: E/AndroidRuntime(1690): at com.google.android.gms.dynamic.a.a(Unknown Source)
12-21 02:04:02.430: E/AndroidRuntime(1690): at com.google.android.gms.dynamic.a.onInflate(Unknown Source)
12-21 02:04:02.430: E/AndroidRuntime(1690): at com.google.android.gms.maps.SupportMapFragment.onInflate(Unknown Source)
12-21 02:04:02.430: E/AndroidRuntime(1690): at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:290)
12-21 02:04:02.430: E/AndroidRuntime(1690): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:685)
12-21 02:04:02.430: E/AndroidRuntime(1690): ... 21 more
Asked
Active
Viewed 106 times
-1
-
can you post the relevant code also – Raghunandan Dec 21 '13 at 07:09
-
Post your layout file code where you have added the map. Also post `ShowRouteMap` activity code. @Nitin – GrIsHu Dec 21 '13 at 07:14
-
see my answer! just put under application tag – Hardik Dec 21 '13 at 07:15
-
how to paste code here.i try to lots time to paste my code but some error here. – Nitin Dec 21 '13 at 07:20
-
The way you have posted your error same way for posting code. Just paste your code and select whole code and then press `Ctrl+K` simple and update your answer. – GrIsHu Dec 21 '13 at 07:22
-
i try to upload code here but i show one message like.Your post appears to contain code that is not properly formatted as code. Please indent all code by 4 spaces using the code toolbar button or the CTRL+K keyboard shortcut. For more editing help, click the [?] toolbar icon. – Nitin Dec 21 '13 at 07:31
1 Answers
1
you can see your log line
12-21 02:04:02.430: E/AndroidRuntime(1690): 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" />
Solution
just put this in your AndroidManifist.xml under application tag
<meta-data
android:name="com.google.android.gms.version"
android:value="4030500" />

Hardik
- 17,179
- 2
- 35
- 40
-
In my code i already add meta-data tag use for api-key value how to add again meta data tag in android-manifest.xml – Nitin Dec 21 '13 at 07:17
-