Win a copy of Kotlin for Android App Development this week in the Kotlin forum!
  • 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:
  • Campbell Ritchie
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

map app gives me error  RSS feed

 
Ranch Hand
Posts: 1310
  • 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: 42974
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: 1310
  • 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: 1310
  • 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.
 
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!