keytool -genkey - v -keystore 名稱.keystore

http://code.google.com/intl/zh-TW/android/maps-api-signup.html

  • Windows Vista: C:Users\.androiddebug.keystore
  • Windows XP: C:Documents and Settings\.androiddebug.keystore
  • OS X and Linux: ~/.android/debug.keystore

MapView要使用以下格式
android:layout_width=”fill_parent”
android:layout_height=”fill_parent”
android:apiKey=”xxxxxxxxxxxxxxxxxxxxxxxxx”
/>

[xml]
< xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ><manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot; package=&quot;edu.ntit.md.imwn.test&quot; android:versionCode=&quot;1&quot; android:versionName=&quot;1.0/>
<application android:icon=&quot;@drawable/icon&quot; android:label=&quot;@string/app_name/>
<activity android:name=&quot;.test&quot;
android:label=&quot;@string/app_name/>
<intent-filter>
<action android:name=&quot;android.intent.action.MAIN&quot; />
<category android:name=&quot;android.intent.category.LAUNCHER&quot; />
</intent-filter>
</activity>
<uses-library android:name=&quot;com.google.android.maps/></uses-library>
</application>
<uses-permission android:name=&quot;android.permission.INTERNET&quot; />
</manifest>
[/xml]

要多

[xml]
<pre><uses-library android:name=”com.google.android.maps”></uses-library> //java.lang.NoClassDefFoundError
<uses-permission android:name=”android.permission.INTERNET” /></pre>
</pre>[/xml]

結果會是白的。還有很多沒設定

device-e1307025707813.png

其它設定:

去掉TitleBar

[xml]<activity android:name=&quot;.HelloGoogleMaps&quot; android:label=&quot;@string/app_name&quot;</span>
<pre> <strong>android:theme=&quot;@android:style/Theme.NoTitleBar&quot;</strong>>[/xml]