Published using Google Docs
Titanium Mobile 開発環境構築:Android編(Win7Home64bit)
Updated automatically every 5 minutes

Titanium Mobile 開発環境構築:Android編(Win7Home64bit)

2011/5/17 by @mrshiromi

事前準備

1)

Android SDK のインストール Windows 編(by @androidzaurus) http://goo.gl/Yv5cV

上記を参考に、Android SDK 及び JDK をインストールして下さい。

64bit版の場合は、「32bit」で環境構築してください。

2)

<AndroidSDK folder>\platform-tools\adb.exe ファイルを <AndroidSDK folder>\tools フォルダにコピーする。

※デフォルトでは

C:\Program Files (x86)\Android\android-sdk-windows\platform-tools\adb.exe

↓ コピーする

C:\Program Files (x86)\Android\android-sdk-windows\tools

インストールする前に

管理者権限のアカウントで作業を行ってください。

管理者権限で実行しないと正常に動作しないことがあります(注 Home Premium)。

Getting Started with Titanium - Documentation Guides - Appcelerator Wiki

http://wiki.appcelerator.org/display/guides/Getting+Started+with+Titanium

Installing on Windows 7 - Documentation Guides - Appcelerator Wiki

http://wiki.appcelerator.org/display/guides/Installing+on+Windows+7

詳しくは、上記wikiに記載されてます。


Titanium Developer ダウンロード&インストール

Appcelerator Developer Center - Getting Started

http://developer.appcelerator.com/get_started

上記ページには、ガイドもあるので、必要に応じて目を通してください。

Windows用の「Titanium Developer」をダウンロードします。

Download and Install Appcelerator Titanium」をクリックすると自動的に「Titanium Developer.msi」のダウンロードが促されます。

※自動的にダウンロードが始まらない場合は、ページ下のほうにあるOSを選んでください。


Titanium Developer.msi をダブルクリック。

「実行」をクリック。

「Next」をクリック。

「I accept the terms in the License Agreement」をチェック。

「Next」をクリック。

「Next」をクリック。

「Install」をクリック。

インストール中。

「Finish」をクリック。


ログイン情報の入力

ログイン情報(メールアドレス・パスワード・名前)を入力して「Sign Up」をクリック。

右上に表示された「Titanium Mobile SDK」の最新版をクリックしてインストール。

Titanium Mobile 1.6.2 - 04/18/2011


Android SDK へのパスを指定

ウィンドウ左上の「Perspectives」から人のアイコンの「Profile」を選択。

画面下のAndroid SDKでパスを指定。

C:\Program Files (x86)\Android\android-sdk-windows

「Save Profile」をクリック。

環境変数でPathを追加

Java

JAVA_HOME

C:\Program Files (x86)\Java\jdk1.6.0_24

Android SDK

ANDROID_SDK

C:\Program Files (x86)\Android\android-sdk-windows

補足

Titanium Mobile SDK のアップデイト

「Titanium Mobile SDK  1.7.0.RC1」が公開されました。

Titanium Mobile SDK 1.7.0 - 05/17/2011 http://developer.appcelerator.com/blog/2011/05/titanium-mobile-sdk-1-7-rc1.html

最新版にしたい場合は、上記を参考にしてください。

Titanium Mobile SDKs のディレクトリ%ProgramData%\Titanium\mobilesdk\win32(C:\ProgramData\Titanium\mobilesdk\win32)

※最新版をインストールして不具合がある場合は一つ前に戻してみましょう。

アプリ起動時に上の画像のような画面が表示されない場合

 ショートカットのプロパティ>互換で「管理者権限で実行する」をチェック。

 または、ショートカットのプロパティ>セキュリティでアクセス許可を「フルコントロール」に変更。

Android SDK 1.5のツールを使用するためにはver1.5のSDKをインストールしておく


「Kitchen Sink」を動かしてみる

https://github.com/appcelerator/KitchenSink

「Downloads」をクリック。

「Dwonload.zip」をクリック。

「appcelerator-KitchenSink-1.6.1-2-gc18229a.zip」ファイルを展開する。

「appcelerator-KitchenSink-1.6.1-2-gc18229a」フォルダを「KitchenSink」にリネイムする。

マイドキュメントに「TitaniumMobile」フォルダを新規作成。

「TitaniumMobile」フォルダ内に「KitchenSink」を移動。

KitchenSinkのインポート

「Inport Project」をクリック。

マイドキュメント内に移動した「KitchenSink」を選択して「OK」をクリック。

「Save Changes」をクリック。


KitchenSinkをエミュレーターで動かす

「Test & Package」をクリック。

SDK:APIs2.2

Screen:HVGA

Filter:Info

「Launch」をクリック。

※初回起動時は時間がかかります。


KitchenSink


SDK Manager を起動すると、「Titanium Mobile」向けの仮想デバイスが確認出来ます。

次回からは、先にエミュレーターを起動しておいてから作業したほうがいいです。

エディタについて

Windowsならnotepad++でいいと思います。

http://notepad-plus-plus.org/

Cronaでの開発も考えてる方は

Notepad++ EUC-JP 対応版

http://www.geocities.jp/npp_euc_jp/