Cordovaをインストールしてみる
cordovaをインストール
npmよりcordovaをインストール
npm install cordova -g
android sdkのパスを設定
export PATH="$PATH:/Applications/android-sdks/tools/" export PATH="$PATH:/Applications/android-sdks/platform-tools/"
設定ファイル読み込み
source ~/.bash_profile
確認
$ android -h Usage: android [global options] action [action options] Global options: -s --silent : Silent mode, shows errors only. -v --verbose : Verbose mode, shows errors, warnings and all messages. --clear-cache: Clear the SDK Manager repository manifest cache. -h --help : Help on a specific command. Valid actions are composed of a verb and an optional
プロジェクトの作成
任意のディレクトリを作成してそこへプロジェクトを作成
cd sample_projects/ cordova create hello com.example.hello HelloWorld -d
ディレクトリへ移動
cd hello/ cordova platform add android
失敗する場合は以下を実行
brew update brew install ant
確認
ls platforms/android/ AndroidManifest.xml cordova platform_www src CordovaLib custom_rules.xml proguard-project.txt assets libs project.properties build.xml local.properties res $
まとめ
html形式で作成できるらしいのでちょっとhtmlを作成したものを適用して確認してみる。
javaでのコーディングは不慣れなので簡単な感じのものから扱ってみる。