SyntaxHighlighter

2010/08/01

Memo: Errors on Android MapView

Pro Android 2
When I tried to use MapView on my application, I got some error messages. These are very basic for MapView, however I though there might be no information about the relationship between the error messages and what I should do. So I memorize them here:

  1. Lack of Google Functions: maps.jar
  2. When you got an error message like followings:
    ERROR/dalvikvm: Could not find class 'XXX', referenced from method YYY.onClick
    or
    ERROR/AndroidRuntime: java.lang.NoClassDefFoundError: XXX
    it is from lack of a user library, maps.jar, even if you have the library in the Eclipse workspace. To solve this, please add the following sentence in the <activity> element tag in the AndroidManifest.xml:
    <uses-library android:name="com.google.android.maps" />
  3. Blank MapView
  4. In the case the MapView is blank, it is from lack of permission to access Internet.
    To solve this problem adding the permission, please write the following sentence in the <application> element in the AndroidManifest.xml:
    <uses-permission android:name="android.permission.INTERNET" />

0 件のコメント:

コメントを投稿