6月 162010
公開用に、AndroidManifest.xmlにminSdkVersionを指定してからコンパイルする。
Android2.1用なので7を指定。
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.shokai.test" android:versionCode="1" android:versionName="1.0"> <uses-sdk android:minSdkVersion="7" /> <application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="true"> <activity android:name=".Test" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest>
公開用apkを作る。
Eclipseでパッケージ名を右クリックして[Android Tools]→[Export Signed Application Package]
1回目は証明書を作る。適当に項目を埋める。

signedなapkができたら、terminalで実機にインストールしてみる。
接続されたデバイス一覧を確認
adb devicesHT04GPL12980にinstall
adb -s HT04GPL12980 install test2.1.apk既に入っているdebug版を先にアンインストールしないとinstallできない。
http://www.android.com/market/ の下のリンク(http://market.android.com/publish)からAndroid Marketでの公開用にGoogleに年会費25ドル払う。
signedなapkとスクリーンショット等を登録、アップロード。
1分も待たずに即公開されていた。android端末側のマーケットで検索するとすぐ出る。

Google APIを使ったアプリは専用の証明書か何かが必要らしい。これだけではアプリは起動するけどGoogle Mapが表示されなかった。