• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

map app gives me error

 
Ranch Hand
Posts: 1325
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
this is my main class


this is may manifest file.


this is my xml file



this is error i am getting



please advise me.

2) I have another problem also.There is only one xml file in layout file.it's naem is activity_main.But it my main class there is a method name onCreateOptionsMenu().
It shoews error when i used the activity_main xml file.But when i used main it doesn't show the any error.

I used below resourses
AndroidGoogleMaps
Article/2-android
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try including the play services library as a library project in your build, and not as a ready-built jar file. The second article you link to talks about problems with the library if you don't do that, although it mentions a different error message.

You can just delete the onCreateOptionsMenu method if you're not using a menu. It references R.menu.main, which is given in that article AFAICT.

Also, the <meta-data> element that has the map key is a child of <application>, not of <activity>. As I've mentioned before, software development is all about paying attention to detail :-)
 
shawn peter
Ranch Hand
Posts: 1325
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I changed the my classes as below.

main activity



xnl file


manifest file



there no errors in project.but when i tryto run it in emulator, it gives me below error



below is logcat error



I have already added the google-play -service project as a library project.
 
shawn peter
Ranch Hand
Posts: 1325
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
After added play services library as a library project also it gives me error.please help.
 
What is that? Is that a mongol hoarde? Can we fend them off with this tiny ad?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic