Go straight to the topic !!!
Steps for developing an application based on Baidu map on an Android device:
1. Download the android SDK:
Http://dev.baidu.com/wiki/imap/index.php? Title = Android % E5 % B9 % B3 % E5 % 8f % B0/% E7 % 9B % B8 % E5 % 85% B3 % E4 % B8 % 8B % E8 % BD
2. Apply for Baidu map API key:
Http://dev.baidu.com/wiki/static/imap/key/
3. Create an android project and add the jar package and so Library (the storage path of the so library is res/libs/Armeabi)
4. Add the mapview component to the layout file.
Note: For jar packages of different versions, the directory where mapview is located may be adjusted.
5. Create an activity
The most basic applications require three related classes: bmapmanager, mapview, and mapcontroller.
Note: The bmapmanager object initialization must be completed before the setcontentview method. Otherwise, an exception occurs in COM. Baidu. mapapi. Map. mapview failed to instantiate.
If the map is not displayed clearly, add:
<Supports-screens
Android: anydensity = "true"
Android: largescreens = "true"
Android: normalscreens = "false"
Android: resizeable = "true"
Android: smallscreens = "true"/>