I recently learned how to be a small Google-Map-API app ......
The first is about the reference location of <uses-Library/>, which is not mentioned in the book. As soon as the result program runs, the has stopped unexpectedly error occurs. At first, I thought there was a problem with the key provided by the API, so I applied for a new one, but the problem still exists. So I found a crazy search on the Internet, which should be like this: <Application Android: icon = "@ drawable/icon" Android: Label = "@ string/app_name"> <Activity Android: Name = ". helloandroid" Android: Label = "@ string/app_name"> <Intent-filter> <Action Android: Name = "android. Intent. Action. Main"/> <Category Android: Name = "android. Intent. Category. launcher"/> </Intent-filter> </Activity> <Uses-library Android: Name = "com. Google. Android. Maps"/> </Application>Note: The <uses-Library/> label can be added only in the <application/> label. If the tag is not correctly placed, it will not be correctly loaded as a third-party library. After the change, the system continues to run. The error still persists. It is has stopped unexpectedly. After several experiments, the problem is finally locked to the mapactivity class, because everything works normally when inheriting the activity class as usual, GPS can also be simulated, but if mapactivity is inherited, the above error will occur. I suddenly remembered whether the library problem was encountered during the build process. Then I changed the Project Build target option of the android option in the attribute from android1.5 to the Google APIS type. At this time, add the library as a third-party library to Java
The map. Jar library of build path is deleted, because after this is selected, the MAR. Jar library is automatically included in Google APIs. Now, we can see that I 've been tossing Google map for several hours ...... Burn incense ......