Eclipseのインデントがタブになってる
のをスペースで置き換える設定.
(私はスペース派)
- Window => Preferences => Java => Formatter => Edit => Indentation
- Tab policyをSpaces onlyに変える
- そのままOKしようとすると怒る(たぶん"Eclipse[built-in]"というデフォのProfileを設定変更しようとしたため) => Profile nameに適当な名前をつける(例:"Eclipse [pixikawa]"とか"Eclipse[customized]"とか"hogehogehuga"とか) => OK
- Active profileが先ほど設定したプロファイル名になっていることを確認 => (なってなかったら変更) => OK
github使う
OS入れ直したらgithubの設定忘れて困ったので備忘.
たぶんこんな流れだったはず.
githubに公開鍵登録
githubにログイン => Account Settings => SSH Public Keys にて追加.
"Title"は任意.複数のマシンからアクセスするならマシン名でも入れれば?
gitインストール,設定
デフォで入っていないので,インストール.
$ sudo apt-get install git
githubのユーザ名,メアドを設定
$ git config --global user.name <githubのユーザ名> $ git config --global user.email <githubのメアド>
Xが固まったときの話
Xサーバをkillするキーボードショートカットを設定できるらしい.
設定 -> キーボード -> レイアウト -> オプション -> Xサーバをkillするためのシーケンス
で,Ctrl+Alt+Backspaceをバインドできる.
Bluetoothをオンにできないと思ったらバグだったらしい.
Ubuntu 11.04でのbluetoothの不具合 | inashiro's blogによると,
様々なインストール環境で問題が起きているらしい。自分の環境では、OS起動時にBluetoothがONにならず “システムの設定” からもON出来ないという現象が起きた。
現段階でも修復されていないみたいで,私の環境でも参照先と同様の手続きで解消された.
sudo service bluetooth restart
Ubuntuのインストール時にハングしたのはこのせいだったのか…USBのBluetoothさしっぱでインストールしたから.
また、サスペンドからの復帰時に問題が起きるケースも報告されている。
恐すぎですね.
Ubuntu 11.04 AMD64はじめました
Android開発環境構築手順を備忘.
sun-java6-jdk
インストール
sudo add-apt-repository 'deb http://archive.canonical.com/ lucid partner' sudo apt-get update sudo apt-get install sun-java6-jdk
デフォルトに設定
sudo update-alternatives --config java
Androidツール
ダウンロード,展開,配置
http://developer.android.com/sdk/index.html
からandroid-sdk_r11-linux_x86.tgzをダウンロード,解凍.
回答したフォルダの中身を~/Android直下に配置.
$ ls ~/Android/ SDK Readme.txt add-ons platforms tools $
って感じ.
パスの設定
.bashrcに以下を追記することで$PATHに~/Android/toolsを追加.
PATH=$PATH:~/Android/tools
端末を再起動→emulatorを機動してみる
$ emulator emulator: ERROR: You did not specify a virtual device name, and the system directory could not be found. If you are an Android SDK user, please use '@<name>' or '-avd <name>' to start a given virtual device (see -help-avd for details). Otherwise, follow the instructions in -help-disk-images to start the emulator
上記のようにエミュの設定を特定してないから怒られるメッセージがでればOK
Eclipse
Eclipseをsoftware-centerとかからインストール,起動.
Android SDKプラグインのインストール
Help -> Install New Software -> Add
- Name: 任意(Android-plugin)など
- Location: https://dl-ssl.google.com/android/eclipse/
Developer Toolsにチェック -> Next -> Next -> Accept -> Finish -> インストール開始
- > "Security Warning"をOK -> "Would you like to restart?"をYes -> 再起動
最後に
"adb"がplatform-toolsに移動したらしい
$ cat ~/Android/tools/adb_has_moved.txt The adb tool has moved to platform-tools/ If you don't see this directory in your SDK, launch the SDK and AVD Manager (execute the android tool) and install "Android SDK Platform-tools" Please also update your PATH environment variable to include the platform-tools/ directory, so you can
ので,.bashrcに以下を追記.
PATH=$PATH:~/Android/platform-tools
strings.xml:365: error: Apostrophe not preceded by \ (in I'm on! :)) って出る件について
AndroidのApiDemosを実行する際,
strings.xml:365: error: Apostrophe not preceded by \ (in I'm on! :))
的なエラーが沢山でてきた.
メッセージ通り素直に「'」を「\'」に変更していいものか・・・と思ってぐぐってみたらこんな記事が.
http://red-moon.tumblr.com/post/728977359/apidemos
すべて*1の「'」を「\'」に置換したらエラー消えまして実行できました.
*1:もともと「\'」となっているものは除く