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

map app gives me error

 
sam liya
Ranch Hand
Posts: 1243
  • 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
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • 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: 1243
  • 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: 1243
  • 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