Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Google Map Display Problem in Android app

 
Kishor Joshi
Ranch Hand
Posts: 674
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1.Hi there I have problem in Running google Map in my Android Application.
So far I have followed steps.
->1)Create an Android Application Project.
->2)Download Google APi+Google Play Services in My SDK.
->3)Get the SHA1 key from my computer.
->4)Register my project (SHA1+Package name) with Google API Console.
->5)Add API key in My Android Manifest.xml.
->6)Run The Project But it is showing following Logcat

08-21 11:41:57.663: D/AndroidRuntime(20674): Shutting down VM
08-21 11:41:57.663: W/dalvikvm(20674): threadid=1: thread exiting with uncaught exception (group=0x420659a8)
08-21 11:41:57.690: E/AndroidRuntime(20674): FATAL EXCEPTION: main
08-21 11:41:57.690: E/AndroidRuntime(20674): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.hellomap/com.example.hellomap.MainActivity}: android.view.InflateException: Binary XML file line #6: Error inflating class fragment
08-21 11:41:57.690: E/AndroidRuntime(20674): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2343)
08-21 11:41:57.690: E/AndroidRuntime(20674): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2395)
08-21 11:41:57.690: E/AndroidRuntime(20674): at android.app.ActivityThread.access$600(ActivityThread.java:162)
08-21 11:41:57.690: E/AndroidRuntime(20674): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1364)
08-21 11:41:57.690: E/AndroidRuntime(20674): at android.os.Handler.dispatchMessage(Handler.java:107)
08-21 11:41:57.690: E/AndroidRuntime(20674): at android.os.Looper.loop(Looper.java:194)
08-21 11:41:57.690: E/AndroidRuntime(20674): at android.app.ActivityThread.main(ActivityThread.java:5371)
08-21 11:41:57.690: E/AndroidRuntime(20674): at java.lang.reflect.Method.invokeNative(Native Method)
08-21 11:41:57.690: E/AndroidRuntime(20674): at java.lang.reflect.Method.invoke(Method.java:525)
08-21 11:41:57.690: E/AndroidRuntime(20674): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833)
08-21 11:41:57.690: E/AndroidRuntime(20674): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
08-21 11:41:57.690: E/AndroidRuntime(20674): at dalvik.system.NativeStart.main(Native Method)
08-21 11:41:57.690: E/AndroidRuntime(20674): Caused by: android.view.InflateException: Binary XML file line #6: Error inflating class fragment
08-21 11:41:57.690: E/AndroidRuntime(20674): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
08-21 11:41:57.690: E/AndroidRuntime(20674): at android.view.LayoutInflater.inflate(LayoutInflater.java:466)
08-21 11:41:57.690: E/AndroidRuntime(20674): at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
08-21 11:41:57.690: E/AndroidRuntime(20674): at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
08-21 11:41:57.690: E/AndroidRuntime(20674): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:281)
08-21 11:41:57.690: E/AndroidRuntime(20674): at android.app.Activity.setContentView(Activity.java:1881)
08-21 11:41:57.690: E/AndroidRuntime(20674): at com.example.hellomap.MainActivity.onCreate(MainActivity.java:14)
08-21 11:41:57.690: E/AndroidRuntime(20674): at android.app.Activity.performCreate(Activity.java:5122)
08-21 11:41:57.690: E/AndroidRuntime(20674): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1081)
08-21 11:41:57.690: E/AndroidRuntime(20674): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2307)
08-21 11:41:57.690: E/AndroidRuntime(20674): ... 11 more
08-21 11:41:57.690: E/AndroidRuntime(20674): Caused by: java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value. Expected 5089000 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" />
08-21 11:41:57.690: E/AndroidRuntime(20674): at com.google.android.gms.common.GooglePlayServicesUtil.A(Unknown Source)
08-21 11:41:57.690: E/AndroidRuntime(20674): at com.google.android.gms.common.GooglePlayServicesUtil.isGooglePlayServicesAvailable(Unknown Source)
08-21 11:41:57.690: E/AndroidRuntime(20674): at com.google.android.gms.maps.internal.u.I(Unknown Source)
08-21 11:41:57.690: E/AndroidRuntime(20674): at com.google.android.gms.maps.internal.u.H(Unknown Source)
08-21 11:41:57.690: E/AndroidRuntime(20674): at com.google.android.gms.maps.MapsInitializer.initialize(Unknown Source)
08-21 11:41:57.690: E/AndroidRuntime(20674): at com.google.android.gms.maps.SupportMapFragment$b.jz(Unknown Source)
08-21 11:41:57.690: E/AndroidRuntime(20674): at com.google.android.gms.maps.SupportMapFragment$b.a(Unknown Source)
08-21 11:41:57.690: E/AndroidRuntime(20674): at com.google.android.gms.dynamic.a.a(Unknown Source)
08-21 11:41:57.690: E/AndroidRuntime(20674): at com.google.android.gms.dynamic.a.onInflate(Unknown Source)
08-21 11:41:57.690: E/AndroidRuntime(20674): at com.google.android.gms.maps.SupportMapFragment.onInflate(Unknown Source)
08-21 11:41:57.690: E/AndroidRuntime(20674): at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:279)
08-21 11:41:57.690: E/AndroidRuntime(20674): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:676)
08-21 11:41:57.690: E/AndroidRuntime(20674): ... 20 more
08-21 11:41:57.776: I/Process(20674): Sending signal. PID: 20674 SIG: 9



this is my manifest.xml file



This is my Layout file



and this is my main activity



Don't know where is the Error

Any Help?

Thanks
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe you missed that the error tells you specifically what is missing in the manifest? I wish more error messages would tell me what I need to do to fix them :-)
 
Kishor Joshi
Ranch Hand
Posts: 674
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What else I need to mention.?Can you Explain?

I have posted my entire LogCat here.


 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm sorry, but do you really not see that the logcat specifically says what you need to do?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic