3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Android環境構築

Posted at
  1. JDK SE6とAntをインストールする。(JDK SE7以降だと少々めんどくさい。)

  2. adt-bundle-windows-x86_64.zipをダウンロードする。

  3. そのzipファイルを解凍しパスを通す。

     C:\Java\adt-bundle-windows-x86_64\sdk\tools
     C:\Java\adt-bundle-windows-x86_64\sdk\platform-tools
    
  4. SDK Manager.exeを起動しGoogle USB Driverをアップデートする。(他にも必要なものがあればそれも...)

  5. 存在している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
    
  6. アプリケーション作成のためのプロジェクトを作成する。

     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
    
  7. ビルド。

     C:\Users\rbtnn\Desktop\and>ant release
    
  8. アプリケーションに署名するために、キーを作成する。

     C:\Users\rbtnn\Desktop\and>keytool -genkey -dname "c=JP" -keypass hogehoge -keystore rsa.keystore -storepass hogehoge -validity 10000 -alias Sample -keyalg RSA
    
  9. アプリケーションに署名する。

     C:\Users\rbtnn\Desktop\and>jarsigner -keystore rsa.keystore -keypass hogehoge -storepass hogehoge Sample-release-unsigned.apk Sample
    

参考

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?