Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

map app gives me error  RSS feed

 
Ranch Hand
Posts: 1288
  • Mark post as helpful
  • send pies
  • 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: 42975
76
  • Mark post as helpful
  • send pies
  • 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 :-)
 
sam liya
Ranch Hand
Posts: 1288
  • Mark post as helpful
  • send pies
  • 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.
 
sam liya
Ranch Hand
Posts: 1288
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
After added play services library as a library project also it gives me error.please help.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!