-
JDK SE6とAntをインストールする。(JDK SE7以降だと少々めんどくさい。)
-
adt-bundle-windows-x86_64.zipをダウンロードする。
-
そのzipファイルを解凍しパスを通す。
C:\Java\adt-bundle-windows-x86_64\sdk\tools C:\Java\adt-bundle-windows-x86_64\sdk\platform-tools
-
SDK Manager.exe
を起動しGoogle USB Driver
をアップデートする。(他にも必要なものがあればそれも...) -
存在しているAndroidターゲットを調べる。
C:\Users\rbtnn\Desktop\and>android list target Available Android targets: ---------- id: 1 or "android-17" Name: Android 4.2 Type: Platform API level: 17 Revision: 1 Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, W XGA720, WXGA800, WXGA800-7in ABIs : armeabi-v7a
-
アプリケーション作成のためのプロジェクトを作成する。
C:\Users\rbtnn\Desktop\and>android create project --target 1 --path ./ --activity Sample --package rbtnn.sample Error: Project folder 'C:\Users\rbtnn\Desktop\and' is not empty. Please consider using 'android.bat update' instead. Created directory C:\Users\rbtnn\Desktop\and\src\rbtnn\sample Added file C:\Users\rbtnn\Desktop\and\src\rbtnn\sample\Sample.java Created directory C:\Users\rbtnn\Desktop\and\res Created directory C:\Users\rbtnn\Desktop\and\bin Created directory C:\Users\rbtnn\Desktop\and\libs Created directory C:\Users\rbtnn\Desktop\and\res\values Added file C:\Users\rbtnn\Desktop\and\res\values\strings.xml Created directory C:\Users\rbtnn\Desktop\and\res\layout Added file C:\Users\rbtnn\Desktop\and\res\layout\main.xml Created directory C:\Users\rbtnn\Desktop\and\res\drawable-xhdpi Created directory C:\Users\rbtnn\Desktop\and\res\drawable-hdpi Created directory C:\Users\rbtnn\Desktop\and\res\drawable-mdpi Created directory C:\Users\rbtnn\Desktop\and\res\drawable-ldpi Added file C:\Users\rbtnn\Desktop\and\AndroidManifest.xml Added file C:\Users\rbtnn\Desktop\and\build.xml Added file C:\Users\rbtnn\Desktop\and\proguard-project.txt
-
ビルド。
C:\Users\rbtnn\Desktop\and>ant release
-
アプリケーションに署名するために、キーを作成する。
C:\Users\rbtnn\Desktop\and>keytool -genkey -dname "c=JP" -keypass hogehoge -keystore rsa.keystore -storepass hogehoge -validity 10000 -alias Sample -keyalg RSA
-
アプリケーションに署名する。
C:\Users\rbtnn\Desktop\and>jarsigner -keystore rsa.keystore -keypass hogehoge -storepass hogehoge Sample-release-unsigned.apk Sample
More than 5 years have passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme