Phonegap、Android command-line tools の create が失敗する
Phonegap、Android command-line tools の create ではまったのでメモ。
結論からいうと、Android sdk のディレクトリにパスが通ってなかっただけなんですががが...
この順でリンクを辿るとハマる
ちなみにググって↓を開き
1. http://phonegap.com/
Getting Started Guides を開き
2. http://docs.phonegap.com/en/2.2.0/guide_getting-started_index.md.html
Getting Started with Android を開いてしまった、そこのあなた!
3. http://docs.phonegap.com/en/2.2.0/guide_getting-started_android_index.md.html#Getting%20Started%20with%20Android
残念、仲間かもしれません。
3. のページにはパス通せと書いていません
パスが通ってないとこんなエラーになります。
$ ./create ccc com.threec.ccc ccc
An error occurred. Deleting project...
正解はこちら
Command-Line Usage → Android の所にパス通せと書いてあります。
http://docs.phonegap.com/en/2.2.0/guide_command-line_index.md.html#Command-Line%20Usage
引用
The Android command-line tools are built upon shell scripts. You must have the Android SDK's tools and platform-tools folders in your PATH!
パスの通し方(いいのかこれで?)
ちなみパスは、ホームディレクトリ、例えば
/Users/you
の下に、
.profile
を作って、こんな感じで書きました。
export PATH=/path/to/android-sdks/tools:/path/to/android-sdks/platform-tools:$PATH
Mac OS X 10.8 です。
.profile
って勝手に作られているもんかと思ったら無くて、勝手に作ったんですが、
いいですかね、これで?