Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Recent Chamber Activity

2016-11-24

Recent Wiki Changes

2016-11-24

Wiki Guide

Side Bar

Windowsの場合

SSH接続について

Git付属のsshのおかげでPowerShellからsshが使えて大変便利。ところが、このsshを使用する場合、$HOME/.ssh/configを作成しても設定を読んでくれません。どうすればいいかと調べたところ、StackOverFlowに答えが載っていました。http://stackoverflow.com/questions/9513712/git-ssh-client-for-windows-and-wrong-path-for-ssh-config-file

答えは以下のパスに置くこと
< Gitのインストールパス >/Git/etc/ssh/ssh_config

・gitはputty形式の鍵に対応していないので、puttyで作った場合はOpenSSH2に変換すること。

・gitのssh接続確認
ssh -vT tomoyuki_okuda@git.pf.osdn.jp

OSDN Gitの使い方

https://osdn.jp/docs/Git%E3%81%AE%E4%BD%BF%E3%81%84%E6%96%B9

AVD(AndroidVirtualDevice)=Andoriod端末エミュレータが使えるまで

Windows環境ではAndroidoエミュレータを起動するまでも幾つか設定が必要。

Intel® Hardware Accelerated Execution Manager (Intel® HAXM)を使うため。

Intelの英文資料は https://software.intel.com/en-us/android/articles/speeding-up-the-android-emulator-on-intel-architecture#_Toc358213269

1.Intel Visualization Technology (VT-x)をONにする。これは各使用PCのBIOSによって設定方法が異なる。BIOSから設定する。
2.AndroidStudioのTool->Android->SDKManagerから、次のことをする。
1. SDK Managerから任意のバージョンの「Intel x86 Atom System Image」と書かれたものと、下方Extras内の「Intel x86 Emulator Accelerator(HAXM)」と書かれたものをチェックします。
2. SDK_PATH\extras\Intel\Hardware_Accelerated_Execution_Manager内にあるIntelHaxm.exe(MacならIntelHAXM.dmg)をクリックし、インストールを行って下さい。
3. インストールが無事成功した場合は完了です。お疲れ様でした。
参考URL:http://qiita.com/oboenikui/items/56da72def4cf477cf1e7

AndroidStudioにおける「プロジェクト」

AndroidStudioは言葉の定義がeclipseやVisualStudioとは異なる。 最初はここで混乱するので注意

AndroidStudioの「プロジェクト」=eclipseの「ワークスペース」=VisualStudioの「ソリューション」
AndroidStudioの「モジュール」=eclipseの「プロジェクト」=VisualStudioの「プロジェクト」
次のサイトがAndroidStudio + Gradle入門にうってつけ。
http://gihyo.jp/dev/serial/01/android_studio/0005?page=2

Gradleを使うために

Gradleはjavaのビルドツールである。AndroidStudioはGradleでビルドすることを基本としている。しかし、普通にモジュールを作成してもビルドできない。

AndroidStudioの右端の「Gradle」タブから、Gradleプロジェクトを追加することができる。今回、追加しようとすると次のようなエラーが表示される。
Error:(1, 0) Plugin with id 'com.android.application' not found
次の説明が解りやすかった。
http://stackoverflow.com/questions/21606504/cant-migrate-project-to-gradle-in-android-studio
The project thinks it's still a non-Gradle based project; it's not the presence of the build.gradle file that makes it Gradle-based, but it's how the project was set up in the first place. You'll need to re-import your project to finish the conversion to Gradle.

First, though, it looks like you don't have a settings.gradle file; it looks like you need one. Since you've set up your project as a single-module project, then you can put the file in your project's root directory, next to build.gradle. It should contain this:

import ':'

In the future if you add more modules to your project you may want to convert it to a multi-module directory structure, but you don't need to worry about that now. In any event, now you need to do the re-import in Android Studio:

    Close your project
    Back up your project
    Delete the .idea folder in the root directory of the project
    Delete all the .iml files in your project
    Import your project in Android Studio, and in the dialog that prompts you for a file, choose the build.gradle file.

After this you should be good to go.

Gradleで日本語対応

・日本語を入力しなおす

AndroidStudoの右下のエンコーディングをUTF-8にする 下記をbuild.gradleに入れる。入れないと日本語のコメントでエラーになる。

tasks.withType(JavaCompile) {
    options.encoding = 'UTF-8'
}

GenymotionにGooglePlayを使えるようにする

http://server-setting.info/android/android-genymotion-kindle.html なお、GoogleAppsのリンクが切れている。新しいリンク先は次 http://www.teamandroid.com/gapps/

サービスやアクティビティ間でのデータのやり取り

アプリケーション内のサービスやアクティビティ間でのデータのやり取り http://www.techdoctranslator.com/resources/faq/faq/framework

まず、Notificationサービスをスタートするところで落ちてたんだけど、やっぱりNotificationは手動でサービスを起動する必要はないみたい。逆に手動で起動すると、Notification取得のバインドがされないみたい。また、デバッグ時に勝手にアクティビティを起動するためエラーになってたようだったら、デバッグ時にもアクティビティを起動しないようにした。 FileWriteKomasan()を呼ぶところでエラーで落ちてる。NotificationサービスからFileWriteKomasanを読んでいる。FileWriteKomasanをActivity継承しなくすれば、普通に呼べるようになった。