Thursday, 28 June 2012

Use a MapView inside a fragment

Objective


Use a MapView inside a fragment.

Issue


An exception is thrown when using a layout with a MapView inside it :
Caused by: java.lang.IllegalArgumentException: MapViews can only be created inside instances of MapActivity.


Solution


  • Download android-support-v4-googlemaps
  • Create a libs directory at the root of your project
  • Add android-support-v4-r6-googlemaps.jar to this directory
  • Make your activity extends FragmentActivity instead of activity

39 comments:

  1. Nice post.Give it up. Thanks for share this article. For more visit:Web App Development

    ReplyDelete
  2. All the time I used to study article in news papers but now as I am a user of web so from now I am using net for articles or reviews, thanks to web.

    www.gofastek.com

    ReplyDelete
  3. I like your post a lot! You should write some more on this!Great job coming with such terrific post!


    jink
    mocsbar.com

    ReplyDelete
  4. You have done a great work. Thanks for making this blog. You helped me a lot on my research topic. Keep it up guys!

    Kendra
    www.imarksweb.org

    ReplyDelete
  5. Thanks for sharing your article. Keep it up!

    jane

    www.n8fan.net

    ReplyDelete
  6. I really enjoyed reading your article. I found this as an informative and interesting post, so i think it is very useful and knowledgeable. I would like to thank you for the effort you have made in writing this article.


    edupdf.org

    ReplyDelete
  7. We must fresh the recipes using hot and soapy h2o so only it gets cleaned and serious cleaning solutions should never be used. Packers and Movers in Chennai
    Packers and Movers in Delhi
    Packers and Movers in Gurgaon
    Packers and Movers in Noida

    ReplyDelete
  8. Thank you for sharing your thoughts and for inspiring us. Keep it up and continue on what your doing. Visit my site too.

    triciajoy.com

    www.triciajoy.com

    ReplyDelete
  9. Thank you for sharing your thoughts and for inspiring us. Keep it up and continue on what your doing. Visit my site too.

    triciajoy.com

    www.triciajoy.com

    ReplyDelete
  10. Love it! Very interesting topics, I hope the incoming comments and suggestion are equally positive. Thank you for sharing this information that is actually helpful.


    ufgop.org
    ufgop.org

    ReplyDelete
  11. Best packers and movers in Vadodara, household shifting service in Vadodara, home relocation in Vadodara, car carriers service in Vadodara, car transport in Vadodara. packers and movers Vadodara

    ReplyDelete
  12. We Provide Best Packers And Movers Bangalore List for Get Free Best Quotes, Compare Charges, Save Money And Time,
    Household Shifting Services @ Packers And Movers Bangalore

    ReplyDelete
  13. Suddenly i found your post very helpful. Thanx for sharing ... I am still waiting for the next post to come Packers And Movers Hyderabad can make your turn simple and basic with their accommodating administrations. However, it is likewise basic that you ought to run with the moving organization that is moderate as well as real. Just enlisted, authorized, protected and experienced moving organization can give you glad and pressure free migration experience.

    ReplyDelete
  14. I agree with you. This post is truly inspiring. I like your post and everything you share with us is current and very informative, I want to bookmark the page so I can return here from you that you have done a fantastic job.
    http://packers-and-movers-delhi.in/
    Packers and Movers Noida

    ReplyDelete
  15. Excellent post! I must thank you for this informative read. I hope you will post again soon. Warehousing of merchandise
    packers movers chennai.in moving organizations and packers Neighborhood Chennai record likewise gives warehousing of items to a boundless timeframe.
    How to complete it step by step with the help of Packers and Movers Chennai
    Packers And Movers Chennai

    ReplyDelete
  16. Thanks a lot for providing me this opportunity to write here i feel myself very blessed.
    please visit our official website for all the useful details-

    Packers And Movers Indore

    ReplyDelete
  17. Thanks a lot for providing me this opportunity to write here i feel myself very blessed.
    please visit our official website for all the useful details-
    Packers And Movers Ahmedabad

    ReplyDelete
  18. Generally I don't read anything but thanks for writing when i read this i felt how graceful as a writer you are.thank you for posting-
    Packers and Movers Kolkata

    ReplyDelete
  19. This comment has been removed by the author.

    ReplyDelete
  20. great post really appreciable work. That will be valuable to everyone who uses it, including myself. Many thanks!
    happy valentines day Greetings
    rose day 2017
    happy hug day
    promise day sms
    Easter Wishes
    Fathers Day images

    ReplyDelete
  21. Your blog post is good and informative. This blog is very helpful for me. Thanks for the post. Good going.
    Packers And Movers Bangalore

    ReplyDelete
  22. An excellent information provided thanks for all the information i must say great efforts made by you. thanks a lot for all the information you provided.
    Packers And Movers Pune

    ReplyDelete
  23. Hi – It’s good to read such interesting content. I agree with much of what is written here and I’ll be coming back.
    Thanks again for posting such great reading material!! To get more relevant information visit here
    Packers And Movers Gurgaon charges
    Packers And Movers In Gurgaon charges

    ReplyDelete
  24. We Provide Best Packers And Movers Gurgaon List for Get Free Best Quotes, Compare Charges,
    Save Money And Time, Household Shifting Services @ http://packers-and-movers-gurgaon.in/
    Packers And Movers Bangalore to hyderabad

    ReplyDelete
  25. very good post which I really enjoy reading. It is not every day that I have the possibility to see something like this.
    Packers and Movers Mumbai

    ReplyDelete
  26. Hi – It’s good to read such interesting content. I agree with much of what is written here and I’ll be coming back.
    Thanks again for posting such great reading material!! To get more relevant information visit here
    Packers And Movers Bangalore to hyderabad

    ReplyDelete
  27. Moving: How to Make It Easier
    When you plan to move to a new location, it's very rational to hire a moving agency, instead of shifting unaccompanied. Collecting moving quotes so as to pick the most suitable company is one of the important things to do in such situations. Select always only the best company which guarantees you a safe, swift and cost-efficient move.
    Packers and Movers in Delhi
    list of packers and movers in mumbai
    list of movers and packers in ahmedabad
    list of packers and movers in pune
    Packers and Movers in Delhi
    list of packers and movers in mumbai
    list of movers and packers in ahmedabad
    list of packers and movers in pune

    ReplyDelete
  28. This blog is so nice to me. I will continue to come here again and again. Visit my link as well. Good luck
    http://www.jualobataborsiherbal.com/ obat aborsi
    http://caramenggugurkankandungan.info/ cara menggugurkan kandungan
    http://www.jualobataborsiherbal.com/cara-menggugurkan-kandungan/ cara menggugurkan kandungan
    http://obataborsi59.com/ obat aborsi
    http://obataborsi59.com/cara-menggugurkan-kandungan-dengan-cepat-dan-aman/ cara menggugurkan kandungan
    http://obattelatdatangbulan.info/ obat telat datang bulan
    http://klinikobataborsi.com/ jual obat aborsi
    http://jualobatpenggugurkandungan.net/ obat penggugur kandungan
    http://tandatandakehamilan.net/ tanda tanda kehamilan
    http://tandatandakehamilan.net/cara-cepat-dan-selamat-menggugurkan-kandungan/ cara menggugurkan kandungan

    ReplyDelete
  29. Sonora required Father's Day to be lauded on the primary Sunday in June, since it was close to her dad's birthday. Or maybe, the primary Father's Day celebration happened on June 19, 1910 in Spokane, Washington. In 1966, President Lyndon Johnson made the third Sunday of June Father's Day.
    https://en.wikipedia.org/wiki/Father
    http://www.fathersday-2014.net/2016/04/top-20-most-beautiful-happy-fathers-day.html

    ReplyDelete
  30. Fancy designer wear our website and reasonable price More…
    We Have Some For You In Your Budget For more…
    Plz visit:- Designer Salwar Suit

    ReplyDelete
  31. With the evolution of the smartphones, the importance of the file transferring applications has increased exponentially. And when we are talking about the file transferring applications, the first name which strikes in our head is of SHAREit. Know everything about this amazing application from this website: SHAREit Download

    ReplyDelete
  32. Exclusive Collection of Salwar Suit and Many More…
    We Have Some For You In Your Budget For more…
    Plz visit:- salwar suit

    ReplyDelete