开发者

classes could not be instantiated org.osmdroid.views.MapView [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

Closed 9 years ago.

  • Questions concerning problems with code you've written must describe the specific problem — and开发者_运维百科 include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
  • Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Improve this question

I am a osmdroid mapview but in layout it shows error. Please tell what to do.

http://www.pics9.com/images/30811182985062401036.jpg

http://www.pics9.com/images/51249770188868693824.jpg


The graphical layout never works properly when trying to display a MapView. I've used both a Google Maps view and an OSM (Osmdroid) map view in my project. The project works OK but you will have to run it to see how the view comes out. The graphical layout of my views show exactly the same '.. could not be instantiated' error as you have. You will need an API key for you Google map as PM said.


In your Layout image, it seems that you havent put the API key. So put the API key and check it again.

To Generate Maps APY key to be used in MapView Android, follow this steps:

  1. Type keytool -list -keystore ~/.android/debug.keystore at the command prompt
  2. Then enter MD5 fingerprint in a textbox showing here: http://code.google.com/android/maps-api-signup.html
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜