はじめに
vagrantからssh接続とFTPソフト(Cyberduck)で接続する方法を残しておきます。
今回はCyberduckにしますが、FTPソフトでSFTP対応であればなんでも構いません。
Vagrant接続
前提(Vagrantfileの設定)
Vagrantfileで以下の設定をしておくこと ※ipアドレスは任意
config.vm.network :private_network, ip: “192.168.33.10″
vagrant ssh-configで設定情報を確認
Vagrantディレクトリ(Vagrantfileと同じパス)で接続情報を確認します
接続情報を確認
$ vagrant ssh-config
Host default
HostName 127.0.0.1
User vagrant
Port 2222
UserKnownHostsFile /dev/null
StrictHostKeyChecking no
PasswordAuthentication no
IdentityFile /Users/xxxx/.vagrant/machines/default/virtualbox/private_key
IdentitiesOnly yes
LogLevel FATAL
接続情報のipアドレスを変更します
$ vagrant ssh-config --host 192.168.33.10
接続情報を確認
$ vagrant ssh-config
Host 192.168.33.10
HostName 127.0.0.1
User vagrant
Port 2222
UserKnownHostsFile /dev/null
StrictHostKeyChecking no
PasswordAuthentication no
IdentityFile /Users/xxxx/.vagrant/machines/default/virtualbox/private_key
IdentitiesOnly yes
LogLevel FATAL
ssh接続(公開鍵認証ログイン)
以下の秘密鍵を使い公開鍵認証でログインします
IdentityFile /Users/xxxx/.vagrant/machines/default/virtualbox/private_key
.ssh/config設定
$ vagrant ssh-config --host 192.168.33.10 >> ~/.ssh/config
ログイン
$ ssh 192.168.33.10
Cyberduck(公開鍵認証ログイン)
ssh-configコマンドより接続情報を確認しCyberduckの新規接続から情報を入力しログインします。
接続情報を確認
$ vagrant ssh-config
Host 192.168.33.10
HostName 127.0.0.1
User vagrant
Port 2222
UserKnownHostsFile /dev/null
StrictHostKeyChecking no
PasswordAuthentication no
IdentityFile /Users/xxxx/.vagrant/machines/default/virtualbox/private_key
IdentitiesOnly yes
LogLevel FATAL
接続:SFTP(SSHによる暗号化FTP)
サーバ:127.0.0.1 または 192.168.33.10
ユーザ名:vagrant
ポート:2222
秘密鍵:/Users/xxxx/.vagrant/machines/default/virtualbox/private_key
秘密鍵を選択する場合、デフォルトでは隠しファイルが表示されないため、ファイルにたどり着けませんが、Commond + Shift + . を実行することで隠しファイルが表示されるようになります。
公開鍵認証ログインではなく、パスワードログインを行う場合は、秘密鍵認証の設定を行わずに、パスワード[vagrant]でログインできます。
はじめに
Mac/windows/linux側(ホスト)とVagrant側(ゲスト)間でファイルのやり取りを行う場合に、VagrantではSYNCED機能を用意しています。そのため、ftpなどのソフトを介してデータのやり取りを行う必要がなくなります。
またパフォーマンス面もVartualBoxの共有フォルダ機能や、FTPソフトよりもベンチマークで早い結果がでています。
SYNCED機能を使うことで、開発はホストPCで行い、実行はVagrant側のゲストで実行することが簡単にできるようになります。
公式ドキュメント※Synced Folder
http://docs.vagrantup.com/v2/synced-folders/
Vagrantfileの設定(共有/同期)
共有は設定を行わない場合もデフォルトでホストのVagrantfileが置いてあるディレクトリとVagrantの/vagrantが同期状態にあります。
Vagrantfileのsynced_folder設定を変更することで任意に指定することが可能になります。
synced_folderフォーマット
フォーマット:
config.vm.synced_folder “ホストPATH”, “ゲストPATH(Vagrant側)”
例:
config.vm.synced_folder “src/”, “/srv/website”
http://docs.vagrantup.com/v2/synced-folders/basic_usage.html
この場合、ホストのsrcディレクトリとゲストのsrv/websiteディレクトリで同期されます。
synced_folderのオプション
公式ドキュメントにオプションの詳細が記載されています。
create (boolean) – If true, the host path will be created if it does not exist. Defaults to false.
disabled (boolean) – If true, this synced folder will be disabled and won’t be setup. This can be used to disable a previously defined synced folder or to conditionally disable a definition based on some external factor.
group (string) – The group that will own the synced folder. By default this will be the SSH user. Some synced folder types don’t support modifying the group.
mount_options (array) – A list of additional mount options to pass to the mount command.
owner (string) – The user who should be the owner of this synced folder. By default this will be the SSH user. Some synced folder types don’t support modifying the owner.
type (string) – The type of synced folder. If this is not specified, Vagrant will automatically choose the best synced folder option for your environment. Otherwise, you can specify a specific type such as “nfs”.
http://docs.vagrantup.com/v2/synced-folders/basic_usage.html
createオプション
ホストパスが存在しない場合にホストのパスを自動作成する場合に設定します。デフォルトはfalse設定です。
指定方法:
config.vm.synced_folder “src/”, “/srv/website”, create: true
disabledオプション
同期を無効化にする場合に設定します。デフォルトはfalse設定です。
指定方法:
config.vm.synced_folder “src/”, “/srv/website”, disabled: true
groupオプション
ディレクトリを所有するグループを設定します。デフォルトはSSHユーザ(vagrant)です。
指定方法:
config.vm.synced_folder “src/”, “/srv/website”, group: “root”
普通ownerと合わせて使用します
config.vm.synced_folder “src/”, “/srv/website”, group: “root”, owner: “root”
mount_optionsオプション
mountのオプションを設定します。配列でオプションを渡します。デフォルトは空です。
指定方法:
mount_options: ["dmode=777", "fmode=777"]
ディレクトリ・ファイルのパーミッションを777設定にしてます
ownerオプション
ディレクトリを所有する所有者を設定します。デフォルトはSSHユーザ(vagrant)です。
指定方法:
config.vm.synced_folder “src/”, “/srv/website”, owner: “root”
typeオプション
同期化されたディレクトリの種類を設定します。vagrantは自動的に環境にあったタイプを設定してくれます。
typeは4種類あり、virtualbox,rsync,nfs,smbです。
virtualboxはvirtualbox付属の共有機能を使い、smbはwindows専用、smbはmac/linux専用となります。
そのためmacの場合はnfsかrsyncを使うことになります。virturalboxは無視しておきます。
virtualbox:
http://docs.vagrantup.com/v2/synced-folders/virtualbox.html
rsync:
http://docs.vagrantup.com/v2/synced-folders/rsync.html
nfs:
http://docs.vagrantup.com/v2/synced-folders/nfs.html
smb:
http://docs.vagrantup.com/v2/synced-folders/smb.html
指定方法:
config.vm.synced_folder “src/”, “/srv/website”, type: “nfs”
typeオプションのrsync設定
typeをrsyncにした場合、linuxコマンドのrsyncを使って同期を行います。
https://download.samba.org/pub/rsync/rsync.html
同期はホスト側でvagrant up / vagrant reload / vagrant rsync / vagrant provision のいずれかのコマンドで行います。
config.vm.synced_folder “src/”, “/srv/website”, type: “rsync”
rsyncコマンドでパラメータとして渡しているデフォルト値は[“–verbose”, “–archive”, “–delete”, “-z”, “–copy-links”]になります。
rsyncのその他設定情報についてはドキュメントを参照ください
http://docs.vagrantup.com/v2/synced-folders/rsync.html
はじめに
vagrantへlocalhostではアクセスできる状態でも、Vagrantfileで指定しているipアドレスでアクセスができない場合があります。
config.vm.network :private_network, ip: “192.168.33.10″
そういった場合の解決策をメモしておきます。
エラーについて
vagrant環境の直下(Vagrantfileがある場所)でvagrantのreloadコマンドを実行します
$ vagrant reload
事象の場合エラーが発生します
[drive] Configuring and enabling network interfaces…
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!ARPCHECK=no /sbin/ifup eth1 2> /dev/null
Stdout from the command:
Device eth1 does not seem to be present, delaying initialization.
Stderr from the command:
原因
vagrantでパッケージをした場合などに、MACアドレスとのマッピングがうまくいかなくなってエラーが起こっているようです。
そのためマッピングを一度無効にすることで解決します。
無効化は以下のようになります
sudo ln -sf /dev/null /etc/udev/rules.d/70-persistent-net.rules
解決策
vagrantへsshで接続します
$ vagrant ssh
そして以下のコマンドでマッピングを無効化します
$ sudo ln -sf /dev/null /etc/udev/rules.d/70-persistent-net.rules
vagrantを抜けます
$ exit
再度reloadします
$ vagrant reload
これでエラーが無事にでなくなります。
この状態でVagarantfileで指定しているipアドレスでアクセスができるようになります。
config.vm.network :private_network, ip: “192.168.33.10″
はじめに
2015年5月13日にリリースiosアプリに関するアナリティクス機能(ベータ版)が実装されました。
これでapple純正のアプリ側にアナリティクス専用ライブラリや独自実装がしなくても良くなりましたね。
いままでもダウンロード数や課金売り上げはわかりましたが、アナリティクス実装により、ユーザのダウンロードの分析ができるので、アプリの最適化に役立てそうです。
アナリティクス公式ガイドラインについて
アナリティクスの詳細・アクセスについては以下のガイドライン・ドキュメントを確認ください
アクセス:
https://itunesconnect.apple.com/WebObjects/iTunesConnect.woa
公式アナウンス:
https://developer.apple.com/app-store/app-analytics/
公式ガイドライン:
https://itunesconnect.apple.com/downloads/Documentation/iTunes_Connect_App_Analytics_Guide_v1.pdf
アナリティクスで確認できる情報について
Googleアナリティクスと同様な考えで、Googleが持っているマーケットからアプリインストール・アプリ起動の流れで取得しているデータを確認できるイメージです。
マーケット(app store)のPV数からマーケットまでのリファラー、そこからのインストール数、セッション数、アクティブデバイス数などかなりの情報がわかります。
アナリティクスのホームページに「概要」「メトリックス」「ソース」「使用率」と4つのタブがあるのでそれぞれで何が確認できるのかを追ってみます。
はじめにアナリティクスの注意点
IOS8以降の端末のみ対象になります。ただ2015/4にIOS8のシェア率は全体の75%を超えたそうなので、データとしては有益な情報になるはずです。
解析されるデータは全て匿名化されているので、ユーザを識別することはできません。
App Analytics only displays data from devices using iOS 8 or later. All data is anonymized and
aggregated with data from other users. To learn more about data metrics and what they mean,
see the Glossary.
概要タブの情報について
各ユーザデータの概要を簡略的に表示している画面です
全期間表示 ※Appが登録されてから現在までのデータ / 過去データで表示されます。
•AppStoreの閲覧数
アプリのマーケットページの閲覧数
•Appユニット数
アプリのマーケットページの閲覧からインストールを行った数 ※同一ユーザやアップデートはカウントしない
•売上
有料アプリの売上金額
•セッション数
アプリを起動した回数。同一ユーザで複数化起動した場合はカウントアップされる。利用情報をApp開発者と共有を同意したユーザのみカウント。
•App内課金数
アプリ内の課金(In-App Purchases)
•アクティブなでデバイス数
セッションでカウントされたユーザの端末数。複数回アプリ起動した場合も1カウントのみ。
上記までのそれぞれのテリトリ(国別)・プラットフォーム(iPhone/iPad/iPod)表示します。
メトリックスタブの情報について
各ユーザデータのメトリックス(合計・平均・指標)を表示している画面です
売上
•AppStore閲覧数
•AppStoreユニット数
•App内課金数
•売上
使用状況
•インストール数
•セッション数
•アクティブなデバイス数
•過去30日間のアクティブなデバイス数
上記データをAppバージョン・iOSバージョン・Webサイト・キャンペーン・テリトリ(国別)・プラットフォーム(iPhone/iPad/iPod)・地域で表示します。また折れ線グラフ・面グラフ・棒グラフで可視化して確認できます。
ソースタブの情報について
「トップWebサイト」と「トップキャンペーン」がありました。
ここが画面からどういった情報を出すのかが読み取る事ができませんでした。。。
公式ガイドラインのドキュメントによりますと、
トップWebサイト
Top Websites
The Top Websites view is available from the Sources tab in App Analytics. This view shows app
sales, usage, and monetization for users that have been referred from a specific website. Click a
website name, and you will have access to metrics for users referred by that website. Within
each metric you will only see data for a specific referring website.
You can use this information to identify websites that refer the right users to your app. For
example, if a larger user base is especially important to your app, focus on websites that refer
the most users.
特定のWebサイトにおいてくれたマーケットのリンクからの流入のユーザ情報(リンクもとページアドレス・AppStore閲覧数・Appユニット数・売上・セッション数)がわかるようです。つまりリファラーですね。
※こちら環境では「Webサイトを表示するための十分なデータがありません。」のメッセージでデータが見えませんでした><
トップキャンペーン
Top Campaigns
The Top Campaigns view is available from the Sources tab in App Analytics. Campaigns are
custom App Store links you can use in your marketing material, websites, or advertising.
Campaign links allow you to see your app sales, usage, and monetization for specific campaigns.
Click a campaign, and you will have access to all of the same App Analytics metrics. Within each
metric you will only see data for a specific campaign you’ve made.
This makes it easier to see which marketing campaign or website advertisement creates the
best results. For example, by looking at In-App Purchases filtered by campaign, you can see
which types of marketing attract customers who are more likely to make a purchase.
アプリのキャンペーン用リンクを作成できる機能があり、ここから作成してできたリンクを設置する事でユーザ情報(リンクもとページアドレス・AppStore閲覧数・Appユニット数・売上・セッション数)がわかるようです。
※こちら環境では「キャンペーンを表示するための十分なデータがありません。」のメッセージでデータが見えませんでした><
使用率タブの情報について
リテンション表示として「指定日付でAppをインストールして、翌日以降にAppを使用したユーザの割合」と「指定日にAppを初期インストールし、その後 Appを使用したユーザの割合」がそれぞれわかります。
「指定日にAppを初期インストールし、その後 Appを使用したユーザの割合」については時間単位でパーセント表示で細かく分かります。
統括
アプリでマネタイズを行っている場合に、SEOやサイトの最適化に非常に役に立つ情報が取得できました。
とくにリファラーが分かると言うのは、Webと同様で広告の効果測定などにも役立ち、アナリティクスを使う場合と使わない場合で広告の打ち方やランディングページの作り方が変わってくるのかと思います。
はじめに
Ansibleでサーバ・ローカルPCのプロビジョニングを行う場合に、構成を記述するのがplaybookファイルです。
一度構成を作ると当分触らないので、書き方を忘れますね、、
Ansibleの公式ドキュメントにあるテンプレートくらいわかれば十分使えるのでテンプレートの構文をとりあえず忘れないようにメモしておきます。
実際はテンプレートをコピーして、ドキュメントを見ながら書き換えてplaybookファイルを作るのが早いと思います。
公式ドキュメント:
http://docs.ansible.com/
playbookのテンプレート構文
構成はyamlという構造化されたデータを表現するためのフォーマットで記述します。
yamlの拡張子はymlでファイルの先頭に—を書くのが決まりになっています。
公式ドキュメントに記載されているテンプレートです
—
- hosts: webservers
vars:
http_port: 80
max_clients: 200
remote_user: root
tasks:
– name: ensure apache is at the latest version
yum: pkg=httpd state=latest
– name: write the apache config file
template: src=/srv/httpd.j2 dest=/etc/httpd.conf
notify:
– restart apache
– name: ensure apache is running (and enable it at boot)
service: name=httpd state=started enabled=yes
handlers:
– name: restart apache
service: name=httpd state=restarted
http://docs.ansible.com/playbooks_intro.html
hosts,vars,tasks,handlersなどの第一番目の構文については以下のドキュメントページより詳細を確認できます
http://docs.ansible.com/glossary.html
[ hosts: webservers ] とInventoryファイルについて
hostsは対象のサーバ(またはローカル)を指定します
※先頭のハイフンはyamlで配列を示しています
- hosts: webservers
webserversの宣言をInventoryファイルに作成する必要があります。
ファイル名は任意ですがhostsというファイル名が一般的です。
hostsファイル
[webservers]
190.168.10.10
webserversグループのipアドレスを指定のようにして使います。※ipアドレスはサーバ(またはローカル)のアドレスとすること
vars
varsでplaybook内で使用する変数を指定します
vars:
http_port: 80
max_clients: 200
yamlではkey:[半角スペース]valueという書き方でハッシュを表します。
keyはhttp_portでvalueは80という具合になります。
このテンプレートでは変数宣言のみで使用していませんが、、(使ってるんでしょうか??どこか別でコールしてるのかもしれません・・・)
使用する場合は{{変数名}}のように中カッコ2つで囲って使えます。
remote_user
接続先のユーザを指定します
remote_user: root
tasks
指定したサーバ(またはローカル)指定したサーバ(またはローカル)で実行するタスクを指定します
tasks:
– name: ensure apache is at the latest version
yum: pkg=httpd state=latest
– name: write the apache config file
template: src=/srv/httpd.j2 dest=/etc/httpd.conf
notify:
– restart apache
– name: ensure apache is running (and enable it at boot)
service: name=httpd state=started enabled=yes
上記では3つのタスクを指定しています。nameでタスクに対して任意の名前を指定しています。
yumはyumコマンドの実行で行う処理を指定します。pkg(そんなオプションない)は、、、おそらく誤りでnameのことだと思います。
正しくは
– name: ensure apache is at the latest version
yum: name=httpd state=latest
この場合httpdのstateがlatestなので最新版をインストールするという意味になります。
templete,serviseもドキュメントを確認してください。
http://docs.ansible.com/yum_module.html
notifyについてですが、こちらは次のhandlersと関わっています。
notifyで指定する名前はhandlersで定義されているnameと同じタスク名を指定しなければいけません。
handlers
notifyで呼ばれた場合に一度だけ実行するタスクを指定します
handlers:
– name: restart apache
service: name=httpd state=restarted
notifyで呼ばない限り実行されません。
httpdサービスを再起動するという意味になります。
playbookを実行する
playbookファイルplaybook.ymlでinventoryファイルhostsの場合は以下のように実行します
ansible-playbook -i hosts -vv playbook.yml
-vvはデバッグ情報を出力してくれます
はじめに
GooglePlay上のSEOロジックは当然ながら公式で公開されていません!
ロジック自体も内部で更新されているので、追っていくのも難しい状態です。
公式に下記のように記載されています
Google Play では毎日何千もの新しいアプリが追加されるため、Google Play ストア上の検索結果の上位は絶えず進化していきます。Google Play での様々なアプリが公開されていることと、掲載順位アルゴリズムの更新によって、検索結果でのアプリの掲載順位が変化することがあります。Google ではどのアプリについても、常に特定の掲載順位で Google Play に表示されることは保証できません。
ただ、アバウトにランキングに影響を与える項目は公開しているため、それらを参考にランキング外にならないように考えてみます。
アプリのエクスペリエンスを向上させてランキングアップを図る
公式にアプリユーザの評価を大きく評価してランキングに影響を与えていると記載しています。特に評価・口コミ・ダウンロード数を要因とするようです。
Google Play の検索では、ユーザーの行動やフィードバックに基づくアプリのエクスペリエンス全体が考慮されます。アプリのランキングは、評価、クチコミ、ダウンロードなど各種要因の組み合わせに基づいて決定されます。
エクスペリエンスについて
Googleは規約・ポリシー内でエクスペリエンスを特に重要としています。アバウトな表現ですが、ユーザに評価される対応が特にSEOとしても評価されます。
ある製品やサービスを利用したり、消費した時に得られる体験の総体。個別の機能や使いやすさのみならず、ユーザが真にやりたいことを楽しく、心地よく実現できるかどうかを重視した概念である。
UXは、認知心理学者でApple Computer社(当時)に勤務していたDonald A. Norman博士の考案した造語と言われている。操作感や使いやすさといった「ユーザインタフェース」「ユーザビリティ」という概念は個々の要素やその振る舞いに着目して使われることがほとんどだが、UXはより包括的な、一連の操作から得られる体験の総体を意味する概念である。
UXと密接に関係するもので同博士が発表した概念として「ユーザ中心設計」がある。これは、ユーザにとって何が望ましいかを検証しながら開発を進めることによって、製品がユーザにとって使いにくいものにならないようにするための考え方である。
ちなみに、Microsoft社のWindows XPの名称の由来となっているのは、UXの「experience」である。現在では、UXという言葉は、インターネットやコンピュータの分野だけでなく、幅広いビジネスの分野で使われている。「UX」と略称で表記されることもある。
引用:
http://e-words.jp/w/UX.html
アプリ最適化
アプリの最適化を行うことで、ユーザに見つけもらいやすくなり、結果エクスペリエンスの向上につながります。
包括的なストアの掲載情報を作成する
ストアの掲載情報のテキストは、アプリを見つけてもらいやすくすることにとって非常に重要です。Google Play でアプリに関するストアの掲載情報を最適化する際のヒントは次のとおりです。タイトル
タイトルは、理解しやすく、一般用語を避け、アプリの内容を効果的に表す固有のものにしてください。
タイトルは簡潔にまとめてください。タイトルが長いと、ユーザーの使用端末に応じて切り捨てられる可能性があります。
一般的な用語を使う場合は細かいスペルミスに気を付けてください。スペルミスのない用語で検索される可能性があります。
説明ユーザーと、ユーザーがアプリに期待していることに焦点を当てます。
Google Play ストアでアプリの説明を確認し、最も重要なテキストが「スクロールせずに見える位置」に表示されるようにします。
説明には SEO のベスト プラクティスをご利用ください。ただし、スパムや IP 侵害(キーワード スパミング、なりすましなどの)に関しては Google Play のコンテンツ ポリシーをご覧ください。
プロモーション テキストアプリのエクスペリエンスを簡潔に 1 行で説明します。このテキストは Android の古いバージョンでのみ使用されます。
画像アセット
アプリのアイコン、画像、スクリーンショットを用意すれば、検索結果、カテゴリ、特集アプリの一覧でアプリを目立たせることができます。必ずしもすべての画像アセットがストアの掲載情報に必要なわけではありませんが、アプリの対応プラットフォーム(携帯電話、7 インチ タブレット、10 インチ タブレット)がわかる品質用スクリーンショットを追加することをおすすめします。
ユーザーを多様化する
ストアの掲載情報をローカライズするGoogle ではストアの掲載情報の自動機械翻訳をご利用いただけますが、これでアプリの定義は万全というわけではありません。とは言うものの、説明をローカライズしておけば検索結果は向上し、世界中のユーザーに見つけてもらいやすくなります。アプリのストアの掲載情報のページで、[翻訳を追加] をクリックし、ローカライズ対象の言語を選択します。
https://support.google.com/googleplay/android-developer/answer/4448378?hl=ja
アルゴリズムのヒント
具体的にアルゴリズムから向上するための4つの方法が記載されています
重み付けや値の詳細情報は Google 検索のアルゴリズムに属するものですが、次の取り組みによってアプリのランキングを向上させることができます:
・持続性がありユーザーにとって意味のあるエクスペリエンスを築く。
・定期的な更新でアプリのメンテナンスを行って改善する。
・評価やコメントの形式でユーザーがフィードバックを提供しやすい環境を作る。
・ユーザーに返信したり問題に対処したりすることで優れたカスタマー サービスを提供する。
https://support.google.com/googleplay/android-developer/answer/4448378?hl=ja
スパム・ランキングに悪影響を与えないことで現状のランキングキープを図る
Googleではスパムなどの不正なアプリは禁止しています。アプリの評価を下げランキングを下げることになるので、最適化と合わせて、こちらも実施をすることがよいです。
Android ユーザーに優れたサービスを提供できるようにするため、Google Play ポリシーではスパムの公開を禁止しています。好ましくないコンテンツ、不正なコンテンツ、繰り返しの多いコンテンツ、関連性の低いコンテンツを Google Play に公開しないでください。こうしたコンテンツは、アプリの評価を下げるだけでなく、否定的なレビューの原因となり、アプリの公開やデベロッパー アカウントの停止につながるおそれがあります。
Google Play デベロッパー プログラム ポリシーに反することをした場合、ランキングが下がる・ランキング外扱い、またはアプリ削除などになってしまいます。
https://play.google.com/about/developer-content-policy.html
偽りの評価やレビュー
良いレビューはランキングを上げる要因としてあげられています。そのため、不正にレビューを操作することでランキングを操作することが考えられますが、Googleではそういった不正なレビューは禁止しています。
評価やレビューはアプリの品質のベンチマークであり、ユーザーはそれらが真実で妥当であるものと信頼しています。アプリのデベロッパーは、そのアプリや競合アプリの評価やレビューに対して人為的に影響を与えようとしてはなりません。偽りの評価やレビューの投稿や、アプリのレビューにスパム コンテンツを記載するような行為は禁止されています。
アプリユーザにレビューに関してガイドラインを提供しています。
偽りのまたは不適切な評価やレビュー
評価やレビューの品質を維持できるように、Google Play ポリシーでは、個人が評価やレビューを使用できる方法を制限しています。特に、評価やレビューを使って Google Play でのアプリの掲載順位に影響を与えることは、ポリシー違反となります。アプリのデベロッパーは必ずこうしたガイドラインに従ってください:
評価を操作しようとしない – 直接または間接に、あるいは競合アプリの評価を操作することによって、自分のアプリの評価、レビュー、掲載順位を操作する試みに関与しないでください。いかなる方法でも、人為的にレビュー、評価、インストールを増やそうとしてはなりません。
インセンティブによって評価を誘わない – 何らかの報酬の提供や、評価とアプリの機能を結び付ける方法などによって、アプリの評価に対するインセンティブをユーザーに提供してはなりません。
アプリを複数回評価しない – Google Play での掲載順位に影響を与える目的で、アプリに対して複数回レビューや評価を行ってはなりません。
レビューに不適切なコンテンツを含めない – レビューにアフィリエイト、クーポン、ゲーム コード、メール アドレス、ウェブサイトや他のアプリへのリンクを含めてはなりません。ユーザーのレビューに返信する場合、サポート アドレスやよくある質問のページなど、参考となるリソースへの参照は自由に記載してください。
https://support.google.com/googleplay/android-developer/answer/2985810?hl=ja
ユーザーの評価の勧誘
Googleはユーザにインセンティブとなる対価と交換に評価を求めるようなアプリも禁止しています
評価に対してインセンティブを提供しない – ユーザーにどのような形でも、Google Play の自分のアプリ(または他のアプリ)への評価に対するインセンティブを提供してはなりません。アプリの機能やコンテンツを何らかの形で評価と結び付けることはできません。
インセンティブを提示せずにアプリの評価をユーザーに求めることは可能です。たとえば、「ゲームが気に入ったらぜひ Google Play で評価してください!」と記載するのはかまいません。しかし、インセンティブを提示してアプリの評価をユーザーに求めることはポリシー違反です。たとえば、「このアプリを評価して 500 コインをゲットしよう」、「5 つ星の評価で 500 コイン進呈!」と記載することはできません。
https://support.google.com/googleplay/android-developer/answer/2985810?hl=ja
キーワード スパム
Googleは公開時のアプリマーケット情報で不正なアプリか判断する材料としています
Google Play にアプリを公開する際、ストアの掲載情報に記載するアプリのタイトルと説明には特に注意する必要があります。これらの項目はユーザーにアプリを認識してもらうために重要です。アプリの優れている点を強調することで、ダウンロードを増やすのに活用します。覚えやすいタイトルと魅力的な説明が、効果的なマーケティングには不可欠ですが、アプリのコンテンツと同様に、これらの項目でも Google Play ポリシーに従う必要があります。
簡単に回避できるような誤りによって、アプリのタイトルや説明が、意識せずにスパムポリシーに違反してしまうデベロッパーは少なくありません。アプリのタイトルや説明でのスパム違反は通常、次のおすすめの方法を守ることで回避できます。
アプリの優れている点を強調する – アプリに関する興味深く、面白い事実をユーザーと共有します。アプリが特別である理由をユーザーにわかりやすくしてください。
アプリを正確に記述する – タイトルと説明で、アプリの機能とユーザー エクスペリエンスを正確に記述します。
キーワードを繰り返さない – キーワードの繰り返しや誇張は避けます。
無関係のキーワードや参照は含めない – 掲載順位や関連度を操作する目的で、関連のないキーワードを説明に含めてはなりません。
簡潔にする – 説明は簡潔で明瞭にします。説明が短くなるほど、画面の小さい端末でのユーザーの利便性が高くなる傾向があります。長すぎたり、詳しすぎたり、反復が多すぎたりすると、スパム ポリシーへの違反となります。
https://support.google.com/googleplay/android-developer/answer/2985717?hl=ja&ref_topic=2985712
アプリのコンテンツ、タイトル、アイコン、説明、スクリーンショットに虚偽または誤解を招くような情報を含めてはなりません。
たとえば下の例では、非常に初歩的なマス目のパズル アプリを、レーシング ゲームのように掲載情報に記載しています。これはポリシー違反です。
https://support.google.com/googleplay/android-developer/answer/4450588?hl=ja&ref_topic=2985712
ウェブ表示スパムとアフィリエイト スパム
Googleはアフィリエイト目的のアプリや複製アプリは禁止しています
Google Play に公開するアプリは、独自のコンテンツを提供する必要があります。主な機能が他者のウェブサイトを複製する、またはフレーム化するだけのアプリを公開してはなりません(許可を受けている場合は除きます)。
同様に、主な機能がウェブサイトへのアフィリエイト アクセスを増加させるだけのアプリを公開してはなりません。アプリの主要な目的が独自のコンテンツや機能の提供である場合に、アフィリエイト取引を含めることは認められますが、主な(または唯一の)目的が別のウェブサイトへのアフィリエイト アクセスを増加させることであるアプリの公開は、Google Play ポリシーに違反します。
https://support.google.com/googleplay/android-developer/answer/2985871?hl=ja&ref_topic=2985712
Googleはどのように不正と判断しているのか?Googleの情報は驚異
レビューやダウンロードを通常のダウンロードとブーストダウンロード、通常のレビューと不正なレビューをどのように見極めているかについてですが、こちらもロジックは公開されていないため、憶測になります。
過去記事でも記載しましたが、人の審査が入ったことで、より細かく見ているとは思いますが、レビューやダウンロードに関しては機械的なロジックで追っているはずです。
[Android]2015/3/17発表GooglePlay仕様変更「アプリ審査実施と新レーティングシステム」について
Googleが持つユーザ情報について
Googleは対象アプリのインストール数・アンインストール数・アクティブ率・離脱率にそれらの実行時間もわかっています。
アカウントより、ユーザが使っているアプリからユーザの趣味嗜好などの情報も持っています。
さらに、ユーザのipアドレス・回線・地域(市区町村まで)・性別・年齢・端末のバージョン・ブラウザもあり、これらも全てを判定材料としています。
レビューについて
不正なユーザのレビューの場合、同一人物または関係者が複数アカウントで複数回レビューを記載することが考えられます。
この場合、アカウントの起動率・アプリインストール数・アカウント作成日時を特に見られます。
Googleは下記のアカウントのレビューが多い場合、不正とみなす可能性があります
1.レビューをした日付とアカウントを作成した日時が近い ※レビュー用のアカウントの可能性が高い
2.アカウントのアクティブ率が低い(アプリ数・起動回数など) ※レビュー用のアカウントの可能性が高い
3.レビュー地域が密集している ※同一人物または関係者が操作していること可能性が高い
ダウンロードについて
ダウンロードで不正なスパムは「ブーストをしているか否か」で間違いないです。
Googleは下記の場合にブーストとみなす可能性があります
1.直リンクのインストールが多い
2.短期間・ある一定期間で急速にインストールが多い
3.インストールに対するアンインストール率が高い
はじめに
Androidの開発では、対象バージョンの範囲が広いほど、開発は大変です。下位バージョンでも動作するサポートツールを導入したりしないといけないので、できたらバージョンは狭めたほうがいいですね。
公式に発表しているシェア率を参考に切り捨てられるバージョンは切り捨てましょう。
Platformバージョンのシェア率
シェア率
参考元:
http://developer.android.com/about/dashboards/index.html
※頻度の高い更新率で最新データを公開しているため、まめに確認すると良い
サポート対象とするか否か
結論、まだ2.3.3のGingerbreadも5.7%のシェアがあります。※去年の2014年4月は11%のため、着実に減っています。
収益目的のアプリの場合は5%は収益を落とす要因になるため、サポートをあと1年は続けたほうがいいように思います。
収益目的でない、優良アプリの場合は、4未満のバージョンはバッサリ切り捨てましょう。
はじめに
bundle installでgemのnokogiriがinstallできていませんとエラーがでました。
直接nokogiriをinstall指定していませんでした。※これはインストールするgem内でnokogiriを使っているgemがあったのかと思います。
その後、nokogiriをyumでインストールしましたがエラーが出たため、対応策をメモしておきます。
エラーの改善について
詳細エラー内容
インストール実行
$ sudo yum install nokogiri
エラー内容
Building native extensions. This could take a while…
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension./home/vagrant/.rbenv/versions/2.2.1/bin/ruby -r ./siteconf20150506-10401-826g5c.rb extconf.rb
checking if the C compiler accepts … yes
Building nokogiri using packaged libraries.
checking for gzdopen() in -lz… yes
checking for iconv… yes
************************************************************************
IMPORTANT NOTICE:Building Nokogiri with a packaged version of libxml2-2.9.2
with the following patches applied:
– 0001-Revert-Missing-initialization-for-the-catalog-module.patch
– 0002-Fix-missing-entities-after-CVE-2014-3660-fix.patchTeam Nokogiri will keep on doing their best to provide security
updates in a timely manner, but if this is a concern for you and want
to use the system library instead; abort this installation process and
reinstall nokogiri as follows:gem install nokogiri — –use-system-libraries
[--with-xml2-config=/path/to/xml2-config]
[--with-xslt-config=/path/to/xslt-config]If you are using Bundler, tell it to use the option:
bundle config build.nokogiri –use-system-libraries
bundle installNote, however, that nokogiri is not fully compatible with arbitrary
versions of libxml2 provided by OS/package vendors.
************************************************************************
Extracting libxml2-2.9.2.tar.gz into tmp/x86_64-unknown-linux-gnu/ports/libxml2/2.9.2… OK
Running patch with /home/vagrant/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2/ports/patches/libxml2/0001-Revert-Missing-initialization-for-the-catalog-module.patch…
Running ‘patch’ for libxml2 2.9.2… ERROR, review ‘/home/vagrant/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2/ext/nokogiri/tmp/x86_64-unknown-linux-gnu/ports/libxml2/2.9.2/patch.log’ to see what happened.
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.Provided configuration options:
–with-opt-dir
–without-opt-dir
–with-opt-include
–without-opt-include=${opt-dir}/include
–with-opt-lib
–without-opt-lib=${opt-dir}/lib
–with-make-prog
–without-make-prog
–srcdir=.
–curdir
–ruby=/home/vagrant/.rbenv/versions/2.2.1/bin/$(RUBY_BASE_NAME)
–help
–clean
–use-system-libraries
–enable-static
–disable-static
–with-zlib-dir
–without-zlib-dir
–with-zlib-include
–without-zlib-include=${zlib-dir}/include
–with-zlib-lib
–without-zlib-lib=${zlib-dir}/lib
–enable-cross-build
–disable-cross-build
/home/vagrant/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/mini_portile-0.6.2/lib/mini_portile.rb:279:in `block in execute’: Failed to complete patch task (RuntimeError)
from /home/vagrant/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/mini_portile-0.6.2/lib/mini_portile.rb:271:in `chdir’
from /home/vagrant/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/mini_portile-0.6.2/lib/mini_portile.rb:271:in `execute’
from extconf.rb:311:in `block in patch’
from extconf.rb:308:in `each’
from extconf.rb:308:in `patch’
from /home/vagrant/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/mini_portile-0.6.2/lib/mini_portile.rb:108:in `cook’
from extconf.rb:278:in `block in process_recipe’
from extconf.rb:177:in `tap’
from extconf.rb:177:in `process_recipe’
from extconf.rb:475:in `‘ extconf failed, exit code 1
Gem files will remain installed in /home/vagrant/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2 for inspection.
Results logged to /home/vagrant/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/extensions/x86_64-linux/2.2.0-static/nokogiri-1.6.6.2/gem_make.out
対応策
エラー内に改善案が書いてありました。
必要なライブラリをインストールし再度nokogiriを指定方法によりインストールします。これで手元環境ではエラーなく成功しました。
$ sudo yum -y install libxml2 libxslt libxml2-devel libxslt-devel $ gem install nokogiri -- --use-system-libraries
はじめに
前回記事のCentOS7バージョンGitlabを公式ドキュメントに従いインストールする方法をメモをメモしておきます。
CentOS7になり、serviceコマンド、chkconfigコマンドが使えなく(互換なし)なってしまい、新たにsystemctlコマンドがでたりなどの違いや、DBもmysqlからmariaDBへ変更されたりとCentOS7のバージョンアップはいままでと結構違っています。
改めてGitLabをCentOS7へインストールしていきます。
インストール手順概要
公式サイト
https://about.gitlab.com/
公式サイトのトップページより「Downloads」ボタンをクリックし、「I want to install GitLab on」でOSを選択します。
対象のOSを選択します ※今回はCentOS7
1. Install and configure the necessary dependencies
sudo yum install openssh-server sudo systemctl enable sshd sudo systemctl start sshd sudo yum install postfix sudo systemctl enable postfix sudo systemctl start postfix sudo firewall-cmd --permanent --add-service=http sudo systemctl reload firewalld
2. Download the Omnibus package and install everything
curl -O https://downloads-packages.s3.amazonaws.com/centos-7.1.1503/gitlab-ce-7.10.1~omnibus.2-1.x86_64.rpm sudo rpm -i gitlab-ce-7.10.1~omnibus.2-1.x86_64.rpm
3. Configure and start GitLab
sudo gitlab-ctl reconfigure
4. Browse to the hostname and login
ブラウザチェック
Username: root
Password: 5iveL!fe
ではインストール作業
1.関連ツールのインストールと起動設定
gitlabの動作で使用しているツールのインストールを行います。
openssh-server:
通信データーを暗号化してリモートアクセスを安全に行うためのプロトコル SSH(Secure SHell)を利用するためのソフトウェア
postfix:
オープンソースソフトウェアのメール転送エージェント
インストール
sudo yum install openssh-server sudo yum install postfix
openssh-serverの起動・再起動時の起動設定をonにします
sudo systemctl enable postfix sudo systemctl start postfix
postfixの起動・再起動時の起動設定をonにします
sudo systemctl enable sshd sudo systemctl start sshd
2.gitlabインストール
gitlabのrpmファイルをダウンロードします
curl -O https://downloads-packages.s3.amazonaws.com/centos-7.1.1503/gitlab-ce-7.10.1~omnibus.2-1.x86_64.rpm
インストール(rpm実行)します
sudo rpm -i gitlab-ce-7.10.1~omnibus.2-1.x86_64.rpm
3.設定ファイルの編集
gitlabの設定ファイル「/etc/gitlab/gitlab.rb」を編集し、各設定を行います。
公式ドキュメントの手順に抜けているが、これがないと次の「gitlab-ctl reconfigure」がうまくいかない?と思います。
sudo vim /etc/gitlab/gitlab.rb
「/etc/gitlab/gitlab.rb」を編集
external_url 'http://[ipアドレス/ホスト名]:8000' gitlab_rails['gravatar_enabled'] = false
8000番ポートにしておく。80の場合apacheとかぶるため。
gitlab_rails['gravatar_enabled'] = falseはgravatar(グローバルに扱われるアバター)を無効にします。
4.ファイアウォール設定
ファイアウォールを切っている場合はとくに不要です。
CentOS7になってiptablesの設定にはfirewalldを使用するようになっています。
sudo firewall-cmd --permanent --add-port=8000/tcp sudo systemctl reload firewalld
※8000ポートの追加
5.設定ファイルの反映と関連処理の実行
gitlabではchefというプロビジョニングを実行してgitlabに必要なnginxのインストールや環境設定などいろいろ行っています。
「3.設定ファイルの編集」で設定した情報もここで設定値を反映します。
sudo gitlab-ctl reconfigure
5.gitlab起動
起動
sudo gitlab-ctl start
———その他オプション————–
停止
sudo gitlab-ctl stop
ステータス確認
sudo gitlab-ctl status
——————————–
6.ブラウザよりgitlabページの表示
http://[ipアドレス/ホスト名]:8000
でアクセスします
ログインユーザとパスはドキュメントに記載している通りです
Username: root
Password: 5iveL!fe
※パスワード変更画面になるので、自分のパスワードに変更したほうが安全です
ここまででインストール作業完了です。
はじめに
個人的にEclipseで便利だったショートカットをAndroidStudioでどうやるかメモしておきます。
MacOS向けのショートカットキーになりますがwindowsの場合はCommandをCtrl,Optionをaltにするなどで大体同じになっています。
ショートカット
自動コードフォーマット
ソースコードまたはレイアウトコードで実行することでインデントの自動調整をします
Ctrl + Option + l
自動インポート
ソースコードで実行することで不要なインポート削除・足りないインポート追加をします
Ctrl + Option + o
定義元へ移動
クラス・メソッド・変数の上で実行することで定義へ移動します
Command + b
修正表示
エラーが出ている箇所の上で実行するとエラーの修正方法を表示します
Option + Enter
コード生成
実行した箇所で生成される可能性のある構文を自動生成します ※setter,getterなど
Command + n
ベースクラスのメソッド一覧
クラスのメソッド一覧を表示します
Ctrl + o
コメント/コメントアウト
ソースコードで対象を選択し実行することでコメントアウトします
Ctrl + /
上記コメントアウトをブロックレベルでコメントアウト実行します
Ctrl⌃ + Shift + /
リネーム
クラス・メソッド・変数の上で実行することでリネームします
※置換とは違い、紐付く名前を一括して変換します
Shift + F6
補完機能(メソッド・変数名など)
コードの途中、または書き始めに実行することで次につながるコードの入力補助ボックスを表示します
Ctrl + Space
検索
クラス、ファイル、変数、設定項目、メニュー、など全てを検索します
Shift2回押し
ファイル内から文字列検索します
Ctrl + f
プロジェクト内から文字列検索します
Ctrl + h
実行
プロジェクトを実行します
Shift + F10
プロジェクトをデバッグ実行します
Shift + F9
はじめに
AndroidStudioへの移行は必須!
AndroidStudioは2013年のGoogle I/O 2013で発表され、プレビュー版、ベータ版の公開をし、その後、2014年12月8日に正式バージョン1.00がリリースされました。それに伴い、EclipseのADTの公式配布が終了となってしまいました。
EclipseADTの配布が終了し4ヶ月が経ち、AndroidStudioも落ち着いてきているのでそろそろ移行をと考えてる方ようにメモしておきます。
やはりGoogle公式IDEなので、EclipseサポートよりAndroidStudioへ力を入れているようです。
AndroidStudioの使用感は、Eclipseよりも若干重く感じましたが(スペックの影響もあるので一概に言えない)、ビューなどの見易さや全体的な使い勝手はEclipseに勝ると思います。
Eclipseから移行した人はショートカットやメニューの位置が違うこと、ディレクトリ構成が違うので最初はすこし戸惑うと思います。
普段からIntelliJ IDEAで開発をしている人はすぐに慣れるインターフェイスです。
実行OSはWindows,Mac,Linux環境で動作するため、Eclipseが動作している環境であれば導入はどの環境でもできます。
旧環境(Eclipse + ADT)から新環境AndroidStudioへ
GoogleはAndroidStudioを発表した2013年のGoogle I/Oより、Android開発環境を発表しました。
2014年12月8日に正式バージョン1.00がリリースされたことでEclipseADTの配布も終了しGoogleもAndroidStudioを開発環境へ推奨しています。まだEclipseADTのサポート自体は終了していないのと、サポートを終了することを明確に記していないので当面の間はEclipseADT環境でも開発できるとおもいますが、いつサポート終了するかもわからないので早めに移行しておきましょう。
2015/7更新
[Android]2015年末EclipseADTサポート終了!早急にAndroidStudioへ移行しましょう
サポートが終了した場合も当面開発は可能と思われますが、AndroidStudioのSDKアップロードで追加されている機能の対応ができなくなっていくので、サポートが終了する前には移行をしておくと良いと思います。
Eclipse既存プロジェクトの移行の場合は、EclipseのプロジェクトをそのままAndroidStudioで読み込むことができるので、移行自体はさほど工数を必要としません。※別項参照
移行についての公式アナウンス
公式アウウンスでも“ADTでEclipseを使用していた場合は、Androidのメーカーは現在、Androidのための公式のIDEであることに注意してください、あなたはすべての最新のIDEの更新を受信するには、Androidのメーカーに移行する必要があります。”とあります。
デベロッパーサイトより引用:
ADT (Android Developer Tools) is a plugin for Eclipse that provides a suite of tools that are integrated with the Eclipse IDE. It offers you access to many features that help you develop Android applications. ADT provides GUI access to many of the command line SDK tools as well as a UI design tool for rapid prototyping, designing, and building of your application’s user interface.
Note: If you have been using Eclipse with ADT, be aware that Android Studio is now the official IDE for Android, so you should migrate to Android Studio to receive all the latest IDE updates. For help moving projects, see Migrating to Android Studio.
If you still wish to use the ADT plugin for Eclipse, see Installing Eclipse Plugin.
Google翻訳:
ADT(Androidの開発者ツールは)のEclipse IDEに統合されているツールのスイートを提供するEclipse用のプラグインです。それはあなたがAndroidアプリケーションの開発に役立つ多くの機能へのアクセスを提供しています。 ADTは、コマンドラインSDKツールの多くにGUIアクセスだけでなく、ラピッドプロトタイピング、設計、およびアプリケーションのユーザインターフェイスの構築のためのUIデザインツールを提供しています。
注:ADTでEclipseを使用していた場合は、Androidのメーカーは現在、Androidのための公式のIDEであることに注意してください、あなたはすべての最新のIDEの更新を受信するには、Androidのメーカーに移行する必要があります。ヘルプ移動プロジェクトでは、Androidのメーカーへのマイグレーションを参照してください。
それでもEclipse用ADTプラグインを使用する場合は、Eclipseプラグインのインストールを参照してください。
http://developer.android.com/tools/help/adt.html
移行作業について
インストールはこちらより
http://developer.android.com/sdk/index.html
新規でAndroidStudioを使うメリット(Eclipse + ADTとの比較)
・ビルドツールがAntからGradleへ
・レイアウト周りのビューのstyle設定値が可視化している
・Android各端末のレイアウト状態が分かる ※Eclipseも同機能ができていた
・ライブラリの取り込みが容易
・ショートカットのマッピングキーが違う
・リファクタリングに強い
・プラグインが豊富 ※Eclipseでよく使うプラグインは代わりになるものが大体あるように思えます
などなど色々なメリットが多く、Eclipseでしかできないような便利機能もないように感じます。
ただショートカットやデバッグ方法などはEclipseで慣れている場合、再度覚え直さないといけないとか・・・くらいかとおもいます。
Vimキーバインドにするプラグイン
vimキーバインドにするプラグインで、Eclipseの場合はgvimプラグインでしたが、AndroidStudioではIdeaVimというプラグインでVim風にすることができます。
IdeaVimはこちら
https://github.com/JetBrains/ideavim
細かいvimの設定は.vimrcファイルの代わりに、~/.ideavimrcが担います。
EclipseプロジェクトをAndroidStudioへ移行する手順
AndroidStudioのディレクトリ構成とEclipseのディレクトリ構成はすこし違っています。AndroidStudioはGradle構成になっていて、Gradleビルドを行う場合に、AntやMavenのように専用のディレクトリ構成に変更したり、特別なことをしたりすることなく実行できます。
EclipseプロジェクトをAndroidStudioへ移行する場合は、Eclipse構成のディレクトリをそのままAndroidStudioからimportを行うことで、自動的にAndroidStudioのディレクトリ構成に変更してくれます。またSDKのバージョン違いなどもエラーで通知してくれたうえ、自動修正用のリンクを用意してくれていたりと至れりつくせり状態です。
※読み込みのライブラリが複数ある場合はそれらを取り込む作業が必要になります
またはEclipseからGradle構成でエクスポートし、AndroidStudioで読み込むことも可能です。
参考:
http://dev.classmethod.jp/smartphone/android/eclipse-project-to-android-studio/
EclipseプロジェクトからAndroidStudioプロジェクトへ変換したディレクトリ構成
上記EclipseプロジェクトをAndroidStudioにimportしたあとのディレクトリ構成が下記です。
はじめに
rails serverコマンドで起動し、http://localhost:3000/tasksと実行でエラーになりました。今回のエラーの改善をメモしておきます。
※rails generate scaffold taskを実行しマイグレーション実行後
エラーの改善について
詳細エラー内容
エラー時に下記のエラーが表示されました
ExecJS::RuntimeUnavailable in Tasks#index ActionView::Template::Error (Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes. (in /home/vagrant/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/turbolinks-2.5.3/lib/assets/javascripts/turbolinks.js.coffee)): 3: <head> 4: <title>Todo</title> 5: <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %> 6: <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %> 7: <%= csrf_meta_tags %> 8: </head> 9: <body> app/views/layouts/application.html.erb:6:in `_app_views_layouts_application_html_erb___192686316235003344_70012938766400'
原因
どうやらnodejsがインストールされていないことが原因のようです。
改善
nodejsをepelリポジトリを入れてインストールします
$ rpm -ivh http://ftp.riken.jp/Linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm $ sudo yum install nodejs npm --enablerepo=epel
ここまで実行し、再度 rails serverで起動してブラウザで確認すると正常に表示されるようになりました。
nodejsインストールで『Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again』になる場合
yumでnodejsインストール時に手持ち環境でエラーが発生しました。
この場合は下記サイトを参考に修正することができました。
$ vi /etc/yum.repos.d/epel.repo #baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch ↓ baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch #mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
はじめに
vrapperの設定情報を環境が変わったときもコピペでいけるようにここに設定情報をメモしておきます。
~/.vrapperrc に配置定義します。
eclipse のキー設定で既に定義されているものは Vrapper で上書きされません
※メニュー > Window > Preferences よりキーマッピング設定[General > Keys]でCtrl + f / Ctrl + bなどマッピングするものをunbindすること
.vrapperrcの設定情報
set smartindent set autoindent set ignorecase set smartcase set incsearch set wrapscan set hlsearch " ### Key-Mapping ### inoremap jj <Esc> inoremap <C-h> <BS> " スクロール nnoremap <C-f> <PageDown> nnoremap <C-b> <PageUp> " ### Action用のKey-Mapping ### " sr : 参照をプロジェクトから検索 noremap sr :SearchReferencesInProject " mn : 次のメンバへ nnoremap mn :GotoNextMember " mp : 前のメンバへ nnoremap mp :GotoPreviousMember " ### 以下、Eclipseの用意しているAction一覧(ノーマルモードでAction名で実行) ※Key-Mappingする場合、Action名を指定すること ### "Action definition ID of the source -> add block comment action eclipseaction AddBlockComment org.eclipse.jdt.ui.edit.text.java.add.block.comment "Action definition ID of the source -> add import action eclipseaction AddImport org.eclipse.jdt.ui.edit.text.java.add.import "Add JavaDoc eclipseaction AddJavaDocComment org.eclipse.jdt.ui.edit.text.java.add.javadoc.comment "definition ID of the source -> add unimplemented constructors action eclipseaction AddUnimplementedContructors org.eclipse.jdt.ui.edit.text.java.add.unimplemented.constructors "definition ID of the refactor -> change type action eclipseaction ChangeType org.eclipse.jdt.ui.edit.text.java.change.type "definition id of the code clean up action eclipseaction CleanUp "org.eclipse.jdt.ui.edit.text.java.clean.up "definition ID of the source -> comment action eclipseaction Comment org.eclipse.jdt.ui.edit.text.java.comment "definition ID of the edit -> content assist complete prefix action eclipseaction ContentAssistCompletePrefix "org.eclipse.jdt.ui.edit.text.java.complete.prefix "definition ID of the refactor -> convert anonymous to nested action eclipseaction ConvertAnonymousToNested org.eclipse.jdt.ui.edit.text.java.convert.anonymous.to.nested "definition ID of the source -> generate delegates action eclipseaction CreateDelegateMethods org.eclipse.jdt.ui.edit.text.java.create.delegate.methods "definition ID of the source -> generate setter/getter action eclipseaction CreateGetterSetter org.eclipse.jdt.ui.edit.text.java.create.getter.setter "definition ID of the source -> externalize strings action eclipseaction ExternalizeStrings org.eclipse.jdt.ui.edit.text.java.externalize.strings "definition ID of the refactor -> extract class action eclipseaction ExtractClass org.eclipse.jdt.ui.edit.text.java.extract.class "definition ID of the refactor -> extract constant action eclipseaction ExtractConstant org.eclipse.jdt.ui.edit.text.java.extract.constant "definition ID of the refactor -> extract interface action eclipseaction ExtractInterface org.eclipse.jdt.ui.edit.text.java.extract.interface "definition ID of the refactor -> extract local variable action eclipseaction ExtractLocalVariable org.eclipse.jdt.ui.edit.text.java.extract.local.variable "definition ID of the refactor -> extract method action eclipseaction ExtractMethod org.eclipse.jdt.ui.edit.text.java.extract.method "definition id of the collapse comments action eclipseaction FoldingCollapseComments "org.eclipse.jdt.ui.edit.text.java.folding.collapseComments "definition id of the collapse members action eclipseaction FoldingCollapseMembers "org.eclipse.jdt.ui.edit.text.java.folding.collapseMembers "definition ID of the source -> format action eclipseaction Format org.eclipse.jdt.ui.edit.text.java.format "definition ID of the source ->generate constructor using fields action eclipseaction GenerateConstructorUsingFields org.eclipse.jdt.ui.edit.text.java.generate.constructor.using.fields "definition ID of the source ->generate hashcode() and equals() action eclipseaction GenerateHashcodeEquals org.eclipse.jdt.ui.edit.text.java.generate.hashcode.equals "definition ID of the edit -> go to matching bracket action eclipseaction GotoMatchingBracket org.eclipse.jdt.ui.edit.text.java.goto.matching.bracket "definition ID of the edit -> go to next member action eclipseaction GotoNextMember org.eclipse.jdt.ui.edit.text.java.goto.next.member "definition ID of the edit -> go to previous member action eclipseaction GotoPreviousMember org.eclipse.jdt.ui.edit.text.java.goto.previous.member "definition ID of the source -> indent action eclipseaction Indent org.eclipse.jdt.ui.edit.text.java.indent "definition ID of the refactor -> infer generic type arguments action eclipseaction InferTypeArgumentsAction org.eclipse.jdt.ui.edit.text.java.infer.type.arguments "definition ID of the refactor -> inline action eclipseaction Inline org.eclipse.jdt.ui.edit.text.java.inline "definition ID of the refactor -> introduce factory action eclipseaction IntroduceFactory org.eclipse.jdt.ui.edit.text.java.introduce.factory "definition ID of the refactor -> introduce indirection action eclipseaction IntroduceIndirection org.eclipse.jdt.ui.edit.text.java.create.indirection "definition ID of the refactor -> introduce parameter action eclipseaction IntroduceParameter org.eclipse.jdt.ui.edit.text.java.introduce.parameter "definition ID of the refactor -> introduce parameter object action eclipseaction IntroduceParameterObject org.eclipse.jdt.ui.edit.text.java.introduce.parameter.object "definition ID of the refactor -> modify method parameters action eclipseaction ModifyMethodParameters org.eclipse.jdt.ui.edit.text.java.modify.method.parameters "definition ID of the refactor -> move element action eclipseaction MoveElement org.eclipse.jdt.ui.edit.text.java.move.element "definition ID of the refactor -> move inner type to top level action eclipseaction MoveInnerToTop org.eclipse.jdt.ui.edit.text.java.move.inner.to.top.level "definition ID of the navigate -> open call hierarchy action eclipseaction OpenCallHierarchy org.eclipse.jdt.ui.edit.text.java.org.eclipse.jdt.ui.edit.text.java.open.call.hierarchy "definition ID of the navigate -> open action eclipseaction OpenEditor org.eclipse.jdt.ui.edit.text.java.open.editor "definition ID of the navigate -> open external javadoc action eclipseaction OpenExternalJavadoc org.eclipse.jdt.ui.edit.text.java.open.external.javadoc "definition ID of the navigate -> Show Hierarchy action eclipseaction OpenHierarchy org.eclipse.jdt.ui.edit.text.java.open.hierarchy "definition ID of the navigate -> Open Structure action eclipseaction OpenStructure org.eclipse.jdt.ui.navigate.java.open.structure "definition ID of the navigate -> open super implementation action eclipseaction OpenSuperImplementation org.eclipse.jdt.ui.edit.text.java.open.super.implementation "definition ID of the navigate -> open type hierarchy action eclipseaction OpenTypeHierarchy org.eclipse.jdt.ui.edit.text.java.org.eclipse.jdt.ui.edit.text.java.open.type.hierarchy "definition ID of the source -> organize imports action eclipseaction OrganizeImports org.eclipse.jdt.ui.edit.text.java.organize.imports "definition ID of the source -> override methods action eclipseaction OverrideMethods org.eclipse.jdt.ui.edit.text.java.override.methods "definition ID of the refactor -> promote local variable action eclipseaction PromoteLocalVariable org.eclipse.jdt.ui.edit.text.java.promote.local.variable "definition ID of the refactor -> pull up action eclipseaction PullUp org.eclipse.jdt.ui.edit.text.java.pull.up "definition ID of the refactor -> push down action eclipseaction PushDown org.eclipse.jdt.ui.edit.text.java.push.down "definition id of the java quick format action eclipseaction QuickFormat "org.eclipse.jdt.ui.edit.text.java.quick.format "definition ID of the source -> remove block comment action eclipseaction RemoveBlockComment org.eclipse.jdt.ui.edit.text.java.remove.block.comment "definition ID of the remove occurrence annotations action eclipseaction RemoveOccurrenceAnnotations org.eclipse.jdt.ui.edit.text.remove.occurrence.annotations "definition ID of the refactor -> rename element action eclipseaction RenameElement org.eclipse.jdt.ui.edit.text.java.rename.element "definition ID of the refactor -> replace invocations action eclipseaction ReplaceInvocations org.eclipse.jdt.ui.edit.text.java.replace.invocations "definition ID of the search -> occurrences in file > break/continue target action eclipseaction SearchBreakContinueTargetOccurrences org.eclipse.jdt.ui.edit.text.java.search.return.continue.targets "definition ID of the search -> declarations in hierarchy action eclipseaction SearchDeclarationsInHierarchy org.eclipse.jdt.ui.edit.text.java.search.declarations.in.hierarchy "definition ID of the search -> declarations in project action eclipseaction SearchDeclarationsInProjects org.eclipse.jdt.ui.edit.text.java.search.declarations.in.project "definition ID of the search -> declarations in working set action eclipseaction SearchDeclarationsInWorkingSet org.eclipse.jdt.ui.edit.text.java.search.declarations.in.working.set "definition ID of the search -> declarations in workspace action eclipseaction SearchDeclarationsInWorkspace org.eclipse.jdt.ui.edit.text.java.search.declarations.in.workspace "definition ID of the search -> occurrences in file > exceptions action eclipseaction SearchExceptionOccurrencesInFile org.eclipse.jdt.ui.edit.text.java.search.exception.occurrences "definition ID of the search -> occurrences in file > implements action eclipseaction SearchImplementOccurrencesInFile org.eclipse.jdt.ui.edit.text.java.search.implement.occurrences "definition ID of the search -> implementors in project action eclipseaction SearchImplementorsInProject org.eclipse.jdt.ui.edit.text.java.search.implementors.in.project "definition ID of the search -> implementors in working set action eclipseaction SearchImplementorsInWorkingSet org.eclipse.jdt.ui.edit.text.java.search.implementors.in.working.set "definition ID of the search -> implementors in workspace action eclipseaction SearchImplementorsInWorkspace org.eclipse.jdt.ui.edit.text.java.search.implementors.in.workspace "definition ID of the search -> occurrences in file > method exits action eclipseaction SearchMethodExitOccurrences org.eclipse.jdt.ui.edit.text.java.search.method.exits "definition ID of the search -> occurrences in file > elements action eclipseaction SearchOccurrencesInFile org.eclipse.jdt.ui.edit.text.java.search.occurrences.in.file "definition ID of the search -> occurrences in file quick menu action eclipseaction SearchOccurrencesInFileQuickMenu org.eclipse.jdt.ui.edit.text.java.search.occurrences.in.file.quickMenu "definition ID of the search -> read access in hierarchy action eclipseaction SearchReadAccessInHierarchy org.eclipse.jdt.ui.edit.text.java.search.read.access.in.hierarchy "definition ID of the search -> read access in project action eclipseaction SearchReadAccessInProject org.eclipse.jdt.ui.edit.text.java.search.read.access.in.project "definition ID of the search -> read access in working set action eclipseaction SearchReadAccessInWorkingSet org.eclipse.jdt.ui.edit.text.java.search.read.access.in.working.set "definition ID of the search -> read access in workspace action eclipseaction SearchReadAccessInWorkspace org.eclipse.jdt.ui.edit.text.java.search.read.access.in.workspace "definition ID of the search -> references in hierarchy action eclipseaction SearchReferencesInHierarchy org.eclipse.jdt.ui.edit.text.java.search.references.in.hierarchy "definition ID of the search -> references in project action eclipseaction SearchReferencesInProject org.eclipse.jdt.ui.edit.text.java.search.references.in.project "definition ID of the search -> references in working set action eclipseaction SearchReferencesInWorkingSet org.eclipse.jdt.ui.edit.text.java.search.references.in.working.set "definition ID of the search -> references in workspace action eclipseaction SearchReferencesInWorkspace org.eclipse.jdt.ui.edit.text.java.search.references.in.workspace "definition ID of the search -> write access in hierarchy action eclipseaction SearchWriteAccessInHierarchy org.eclipse.jdt.ui.edit.text.java.search.write.access.in.hierarchy "definition ID of the search -> write access in project action eclipseaction SearchWriteAccessInProject org.eclipse.jdt.ui.edit.text.java.search.write.access.in.project "definition ID of the search -> write access in working set action eclipseaction SearchWriteAccessInWorkingSet org.eclipse.jdt.ui.edit.text.java.search.write.access.in.working.set "definition ID of the search -> write access in workspace action eclipseaction SearchWriteAccessInWorkspace org.eclipse.jdt.ui.edit.text.java.search.write.access.in.workspace "definition ID of the edit -> select enclosing action eclipseaction SelectEnclosing org.eclipse.jdt.ui.edit.text.java.select.enclosing "definition ID of the edit -> select restore last action eclipseaction SelectLast org.eclipse.jdt.ui.edit.text.java.select.last "definition ID of the edit -> select next action eclipseaction SelectNext org.eclipse.jdt.ui.edit.text.java.select.next "definition ID of the edit -> select previous action eclipseaction SelectPrevious org.eclipse.jdt.ui.edit.text.java.select.previous "definition ID of the refactor -> self encapsulate field action eclipseaction SelfEncapsulateField org.eclipse.jdt.ui.edit.text.java.self.encapsulate.field "definition id of show in breadcrumb action eclipseaction ShowInBreadcrumb "org.eclipse.jdt.ui.edit.text.java.gotoBreadcrumb "definition ID of the navigate -> show in navigator action eclipseaction ShowInNavigatorView org.eclipse.jdt.ui.edit.text.java.show.in.navigator.view "definition ID of the navigate -> show in package explorer action eclipseaction ShowInPackageView org.eclipse.jdt.ui.edit.text.java.show.in.package.view "definition ID of the navigate -> Show Outline action eclipseaction ShowOutline org.eclipse.jdt.ui.edit.text.java.show.outline "definition ID of the source -> sort order action eclipseaction SortMembers org.eclipse.jdt.ui.edit.text.java.sort.members "definition ID of the source -> surround with try/catch action eclipseaction SurroundWithTryCatch org.eclipse.jdt.ui.edit.text.java.surround.with.try.catch "definition id of toggle breadcrumb action eclipseaction ToggleBreadcrumb "org.eclipse.jdt.ui.edit.text.java.toggleBreadcrumb "definition ID of the source -> toggle comment action eclipseaction ToggleComment org.eclipse.jdt.ui.edit.text.java.toggle.comment "definition id of toggle mark occurrences action eclipseaction ToggleMarkOccurrences "org.eclipse.jdt.ui.edit.text.java.toggleMarkOccurrences "definition ID of the edit -> smart typing action eclipseaction ToglleSmartTyping org.eclipse.jdt.smarttyping.toggle "definition ID of the toggle text hover tool bar button action eclipseaction ToggleTextHover org.eclipse.jdt.ui.edit.text.java.toggle.text.hover "definition ID of the source -> uncomment action eclipseaction Uncomment org.eclipse.jdt.ui.edit.text.java.uncomment "definition ID of the refactor -> use supertype action eclipseaction UseSupertype org.eclipse.jdt.ui.edit.text.java.use.supertype "Action definition id of the edit delete line action. eclipseaction DeleteLine org.eclipse.ui.edit.text.delete.line "Action definition id of the edit join lines action. eclipseaction JoinLines org.eclipse.ui.edit.text.join.line "Action definition id of the edit cut line action. eclipseaction CutLine org.eclipse.ui.edit.text.cut.line "Action definition id of the edit delete line to beginning action. eclipseaction DeleteLineToBeginning org.eclipse.ui.edit.text.delete.line.to.beginning "Action definition id of the edit cut line to beginning action. eclipseaction CutLineToBeginning org.eclipse.ui.edit.text.cut.line.to.beginning "Action definition id of the edit delete line to end action. eclipseaction DeleteLineToEnd org.eclipse.ui.edit.text.delete.line.to.end "Action definition id of the edit cut line to end action. eclipseaction CutLineToEnd org.eclipse.ui.edit.text.cut.line.to.end "Action definition id of the edit set mark action. eclipseaction SetMark org.eclipse.ui.edit.text.set.mark "Action definition id of the edit clear mark action. eclipseaction ClearMark org.eclipse.ui.edit.text.clear.mark "Action definition id of the edit swap mark action. eclipseaction SwapMark org.eclipse.ui.edit.text.swap.mark "Action definition id of the smart enter action. eclipseaction SmartEnter org.eclipse.ui.edit.text.smartEnter "Action definition id of the smart enter (inverse) action. eclipseaction SmartEnterInverse org.eclipse.ui.edit.text.smartEnterInverse "Action definition id of the move lines upwards action. eclipseaction MoveLinesUp org.eclipse.ui.edit.text.moveLineUp "Action definition id of the move lines downwards action. eclipseaction MoveLinesDown org.eclipse.ui.edit.text.moveLineDown "Action definition id of the copy lines upwards action. eclipseaction CopyLinesUp org.eclipse.ui.edit.text.copyLineUp "Action definition id of the copy lines downwards action. eclipseaction CopyLinesDown org.eclipse.ui.edit.text.copyLineDown "Action definition id of the upper case action. eclipseaction UpperCase org.eclipse.ui.edit.text.upperCase "Action definition id of the lower case action. eclipseaction LowerCase org.eclipse.ui.edit.text.lowerCase "Action definition id of the navigate goto previous line action. eclipseaction LineUp org.eclipse.ui.edit.text.goto.lineUp "Action definition id of the navigate goto next line action. eclipseaction LineDown org.eclipse.ui.edit.text.goto.lineDown "Action definition id of the navigate goto line start action. eclipseaction LineStart org.eclipse.ui.edit.text.goto.lineStart "Action definition id of the navigate goto line end action. eclipseaction LineEnd org.eclipse.ui.edit.text.goto.lineEnd "Action definition id of the navigate goto line action. eclipseaction LineGoto org.eclipse.ui.edit.text.goto.line "Action definition id of the navigate goto previous column action. eclipseaction ColumnPrevious org.eclipse.ui.edit.text.goto.columnPrevious "Action definition id of the navigate goto next column action. eclipseaction ColumnNext org.eclipse.ui.edit.text.goto.columnNext "Action definition id of the navigate goto previous page action. eclipseaction PageUp org.eclipse.ui.edit.text.goto.pageUp "Action definition id of the navigate goto next page action. eclipseaction PageDown org.eclipse.ui.edit.text.goto.pageDown "Action definition id of the navigate goto previous word action. eclipseaction WordPrevious org.eclipse.ui.edit.text.goto.wordPrevious "Action definition id of the navigate goto next word action. eclipseaction WordNext org.eclipse.ui.edit.text.goto.wordNext "Action definition id of the navigate goto text start action. eclipseaction TextStart org.eclipse.ui.edit.text.goto.textStart "Action definition id of the navigate goto text end action. eclipseaction TextEnd org.eclipse.ui.edit.text.goto.textEnd "Action definition id of the navigate goto start of window action. eclipseaction WindowStart org.eclipse.ui.edit.text.goto.windowStart "Action definition id of the navigate goto end of window action. eclipseaction WindowEnd org.eclipse.ui.edit.text.goto.windowEnd "Action definition id of the navigate scroll line up action. eclipseaction ScrollLineUp org.eclipse.ui.edit.text.scroll.lineUp "Action definition id of the navigate scroll line down action. eclipseaction ScrollLineDown org.eclipse.ui.edit.text.scroll.lineDown "Action definition id of the select line up action. eclipseaction SelectLineUp org.eclipse.ui.edit.text.select.lineUp "Action definition id of the select line down action. eclipseaction SelectLineDown org.eclipse.ui.edit.text.select.lineDown "Action definition id of the select line start action. eclipseaction SelectLineStart org.eclipse.ui.edit.text.select.lineStart "Action definition id of the select line end action. eclipseaction SelectLineEnd org.eclipse.ui.edit.text.select.lineEnd "Action definition id of the select previous column action. eclipseaction SelectColumnPrevious org.eclipse.ui.edit.text.select.columnPrevious "Action definition id of the select next column action. eclipseaction SelectColumnNext org.eclipse.ui.edit.text.select.columnNext "Action definition id of the select page up action. eclipseaction SelectPageUp org.eclipse.ui.edit.text.select.pageUp "Action definition id of the select page down action. eclipseaction SelectPageDown org.eclipse.ui.edit.text.select.pageDown "Action definition id of the select previous word action. eclipseaction SelectWordPrevious org.eclipse.ui.edit.text.select.wordPrevious "Action definition id of the select next word action. eclipseaction SelectWordNext org.eclipse.ui.edit.text.select.wordNext "Action definition id of the select text start action. eclipseaction SelectTextStart org.eclipse.ui.edit.text.select.textStart "Action definition id of the select text end action. eclipseaction SelectTextEnd org.eclipse.ui.edit.text.select.textEnd "Action definition id of the select window start action. eclipseaction SelectWindowStart org.eclipse.ui.edit.text.select.windowStart "Action definition id of the select window end action. eclipseaction SelectWindowEnd org.eclipse.ui.edit.text.select.windowEnd "Action definition id of the edit delete previous character action. eclipseaction DeletePrevious org.eclipse.ui.edit.text.deletePrevious "Action definition id of the edit delete next character action. eclipseaction DeleteNext org.eclipse.ui.edit.text.deleteNext "Action definition id of the edit delete previous word action. eclipseaction DeletePreviousWord org.eclipse.ui.edit.text.deletePreviousWord "Action definition id of the edit delete next word action. eclipseaction DeleteNextWord org.eclipse.ui.edit.text.deleteNextWord "Action definition id of the edit shift right action. eclipseaction ShiftRight org.eclipse.ui.edit.text.shiftRight "Action definition id of the edit shift left action. eclipseaction ShiftLeft org.eclipse.ui.edit.text.shiftLeft "Action definition id of the toggle input mode action. eclipseaction ToggleOverwrite org.eclipse.ui.edit.text.toggleOverwrite "Action definition id of toggle show selected element only action. eclipseaction ToggleShowSelectedElementOnly org.eclipse.ui.edit.text.toggleShowSelectedElementOnly "Action definition id of the show ruler context menu action. eclipseaction ShowRulerContextMenu org.eclipse.ui.edit.text.showRulerContextMenu "Action definition id of go to last edit position action. eclipseaction GotoLastEditPosition org.eclipse.ui.edit.text.gotoLastEditPosition "Action definition id of go to next annotation action. eclipseaction GotoNextAnnotation org.eclipse.ui.edit.text.gotoNextAnnotation "Action definition id of go to previous annotation action. eclipseaction GotoPreviousAnnotation org.eclipse.ui.edit.text.gotoPreviousAnnotation "Action definition ID of the edit -> content assist proposal action eclipseaction ContentAssistProposals org.eclipse.ui.edit.text.contentAssist.proposals "Action definition ID of the edit -> content assist context information action eclipseaction ContentAssistContextInformation org.eclipse.ui.edit.text.contentAssist.contextInformation "Action definition ID of the edit -> quick assist proposal action eclipseaction QuickAssist org.eclipse.jdt.ui.edit.text.java.correction.assist.proposals "Action definition ID of the edit -> smart insert mode action eclipseaction ToggleInsertMode org.eclipse.ui.edit.text.toggleInsertMode eclipseaction ChangeEncoding org.eclipse.ui.edit.text.changeEncoding "Command ID of the revert line action eclipseaction QuickdiffRevertline org.eclipse.ui.editors.quickdiff.revertLine "Command ID of the revert selection/block action eclipseaction QuickdiffRevert org.eclipse.ui.editors.quickdiff.revert "Command ID of the toggle quick diff action. The name has no proper prefix for historical reasons. eclipseaction QuickdiffToggle org.eclipse.quickdiff.toggle "Command ID of the toggle display of line numbers eclipseaction LinenumberToggle org.eclipse.ui.editors.lineNumberToggle "Action definition ID of the edit -> text complete action eclipseaction HippieCompletion org.eclipse.ui.edit.text.hippieCompletion "Command ID of the command to cycle the revision rendering mode. eclipseaction RevisionRenderingCycle org.eclipse.ui.editors.revisions.rendering.cycle "Command ID of the command to toggle the revision author display. eclipseaction RevisionAuthorToggle org.eclipse.ui.editors.revisions.author.toggle "Command ID of the command to toggle the revision ID display. eclipseaction RevisionIdToggle org.eclipse.ui.editors.revisions.id.toggle "Command ID of the recenter command. eclipseaction Recenter org.eclipse.ui.edit.text.recenter "Command ID of the command to toggle the display of whitespace characters. eclipseaction ShowWhitespaceCharacters org.eclipse.ui.edit.text.toggleShowWhitespaceCharacters "Command ID of the command to display information for the current caret location in a sticky hover. eclipseaction ShowInformation org.eclipse.ui.edit.text.showInformation "Action definition id of the file print action. Value: eclipseaction Print org.eclipse.ui.file.print "Action definition id of the file save action. eclipseaction Save org.eclipse.ui.file.save "Action definition id of the file revert action. eclipseaction RevertToSaved org.eclipse.ui.edit.revertToSaved "Action definition id of the edit cut action. eclipseaction Cut org.eclipse.ui.edit.cut "Action definition id of the edit copy action. eclipseaction Copy org.eclipse.ui.edit.copy "Aaction definition id of the edit past action. eclipseaction Paste org.eclipse.ui.edit.paste "Action definition id of the edit undo action. eclipseaction Undo org.eclipse.ui.edit.undo "Action definition id of the file properties action. eclipseaction Properties org.eclipse.ui.file.properties "Action definition id of the edit redo action. eclipseaction Redo org.eclipse.ui.edit.redo "Action definition id of the edit delete action. eclipseaction Delete org.eclipse.ui.edit.delete "Action definition id of the edit select all action. eclipseaction SelectAll org.eclipse.ui.edit.selectAll "Action definition id of the edit find/replace action. eclipseaction FindReplace org.eclipse.ui.edit.findReplace "Action definition id of the edit add bookmark action. eclipseaction AddBookmark org.eclipse.ui.edit.addBookmark "Action definition id of the edit add task action. eclipseaction AddTask org.eclipse.ui.edit.addTask "Action definition id of the edit find next action. eclipseaction FindNext org.eclipse.ui.edit.findNext "Action definition id of the edit find previous action. eclipseaction FindPrevious org.eclipse.ui.edit.findPrevious "Action definition id of the edit incremental find action. eclipseaction FindIncremental org.eclipse.ui.edit.findIncremental "Action definition id of the edit incremental find reverse action. eclipseaction FindIncrementalReverse org.eclipse.ui.edit.findIncrementalReverse "The command identifier for the "move" action that typically appears in the file menu. eclipseaction Move org.eclipse.ui.edit.move "The command identifier for the "rename" action that typically appears in the file menu. eclipseaction Rename org.eclipse.ui.edit.rename
はじめに
iosの申請ではとくにスクリーンショットの画像を作成するのが手間になるので、忘れないように直にできる方法をメモしておきます。
申請時のスクリーンショットについて
5パターンの解像度に合ったサイズでスクリーンショットを載せる必要があり少しめんどくさいです。
スクリーンショットのため、対象のアプリを起動してiphoneでまず5枚(最低1枚)のスクリーンショットを撮ってください。
その画像を元に、リサイズ処理をするのが手っ取り早いと思います。
各申請サイズ一覧
画像サイズ | 備考 | |
3.5inch[iphone3/3GS/4/4S] | 640*920,620*960,960*640 | 最大5枚指定(最低1枚必須) |
4inch[iphone5] | 640*1096,640*1136,1136*600,1136*640 | 最大5枚指定(最低1枚必須) |
4.7inch[iphone6] | 750*1334,1334*750 | 最大5枚指定(最低1枚必須) |
5.5inch[iphone6] | 1242*2208,2208*1242 | 最大5枚指定(最低1枚必須) |
ipad | 768*1024 | 最大5枚指定(最低1枚必須) |
リサイズツールでリサイズ
画像のリサイズツールは検索すると沢山あるのでどれでもいいとは思いますが、macを使っている場合は「iMage Tools」というツールが使いやすかったのでおすすめです。
下記よりインストールをしてください
https://itunes.apple.com/jp/app/image-tools/id493949693?mt=12
起動したらスクリーンショット画像をドラッグでアプリに貼付けます。右側メニューのResizeをONにして、「Fix to Rectangle」を選択します。そこからwidth,heightを指定します。各サイズに合わせて指定し、startボタンでリサイズが実行されます。
アルファ(透過)の除去
iosの申請時に画像に透過画像がある場合、エラーメッセージが表示されて画像を指定できません。
そのため、アルファを除去する必要があります。macの場合、画像をダブルクリックでプレビューアプリが起動します。メニューの「ファイル」を選択し、「書き出す」でフォーマット(png,jpg,tiffなど)、アルファの指定ができます。
アルファのチェックを外し保存でアルファを除去できます。
はじめに
画像表示で、xperiaのみ画像がうまく反映していないというバグがあり、調べていたら原因がわかりましたので、忘れないようにメモしておきます。
Xperiaバグについて
TextViewのbackgroud画像にデフォルト画像を指定し、コード上でbackground画像を別の画像に再指定を行うと、
xperiaのみが、別の画像に変更しても反映されず、常にデフォルト画像が表示されます。
xperia以外の場合は、変更画像が反映されて表示されるので、xperiaの機種依存バグになります。
ただ、TextViewではなく画像は通常ImageViewなので、通常こんな事象になることはないはずなんですね。
もし画像と文字をどちらも使いたい場合は、ImageViewとTextViewを組み合わせて使うのが良いです。
xperia機種依存バグ詳細
<TextView android:id="@+id/hogehoge" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/hogehoge" />
コード上でTextViewのインスタンスを取得し、setBackgroundメソッド、setBackgroundResourceメソッドなどで画像を変更しても反映されずに、デフォルトのhogehoge画像が表示されていました。
このときに別機種でgalaxy,htcは変更した画像に変更されていました。
バグ解決策
もちろん、ImageViewとTextViewに分けたら直りますが、応急策とするようなら、下記レイアウトのように、bacground指定を外してあげると設定した画像が反映されるようになります。
<TextView android:id="@+id/hogehoge" android:layout_width="wrap_content" android:layout_height="wrap_content" />
その他xperiの機種依存バグ
ネット検索で探すとxperiaの場合にcssのbackground-sizeが効かないなど
他にもバグが潜んでいるようです。
http://creator.cotapon.org/articles/css/css3/android%E7%AB%AF%E6%9C%AB%E3%81%A7%E3%81%AEbackground-size%E3%81%A7%E3%83%8F%E3%83%9E%E3%81%A3%E3%81%9F
xperiaには画像周りでバグがこのほかにもある可能性が高いため、試験端末にはxperiaもあると良いかもしれませんね。
coffee-break
Don't write code that useless.
1日5杯はコーヒー、カフェオレ飲みます。狭心症のため安静にします☆松本 雄貴
Kotlinでサービスリリース目指す!
iOSでチャットアプリ作成中。自然言語解析LSIを習得中
Mac / Android・iOS / Rails / Oracle
2017年 Lpic L2取得
2012年 Android技術者資格取得
2010年 OracleMasterGold10g取得
2008年 CCNAQiitaもたまに投稿
https://qiita.com/y-matsumoto東京近郊で常駐開発探してる方はこちらよりご連絡ください
SES企業でパートナー会社を探している企業様はこちらよりご連絡ください
スプリットカメラ iOS / Android
音声認識で聞いた日付から曜日当てアプリ Android
ソーシャルタイマー Android
カテゴリー
- ActiveRecord (2)
- Android (52)
- AndroidStudio (10)
- Ansible (1)
- AWS (1)
- Bash (18)
- Blog (7)
- BootStrap (1)
- CentOS (16)
- Chef (1)
- css (2)
- Eclipse (5)
- error (1)
- Facebook (2)
- Firebase (1)
- FuelPHP (16)
- Git (22)
- GitHub (3)
- Gradle (2)
- GraphAPI (1)
- Grunt (1)
- heroku (2)
- illustrator (1)
- iOS (17)
- Java (4)
- Jenkins (1)
- jQuery (3)
- Kotlin (2)
- Mac (22)
- nginx (1)
- Node.js (3)
- peco (1)
- php (5)
- Python (1)
- Rails (16)
- Ruby (11)
- shell (1)
- SNS (1)
- Swift (2)
- tmux (2)
- Vagrant (6)
- Vim (6)
- windows (2)
- WordPress (3)
- zsh (4)
- フリーランス (1)
- ライブラリ (1)
- 勉強会 (2)
- 宣伝 (1)
- 未分類 (2)
最近の投稿
- [MAC]HighSierraでgitプッシュエラー「Unable to negotiate with xxx.xxx.xxx.xxx port xx: no matching cipher found. Their offer: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se fatal: Could not read from remote repository.」
- [iOS]iOS11からFacebook,Twitter連携(シェアなど)廃止の対応方法
- [iOS]速報2017AppleSpecialEventのiOS11、iPhone8など発表内容について
- [iOS][Firebase]The default Firebase app has not yet been configured. Add `[FIRApp configure];
- [iOS]2017年9月リリースのiOS11で開発者が対応するべきこと
- 今人気の現金化サービスCASH(キャッシュ)を使ったレビュー
- [Pandoc][Mac]pandocでmarkdownからwordファイル作成
- [Android]映画サマーウォーズの聞いた日付(誕生日)から曜日当てをアプリ音声認識で簡単に実現
- [Android]起動しているActivityを取得するadb shell コマンド
- [Android][Kotlin]kotlin学習で参考になるサイト一覧
2024年5月 月 火 水 木 金 土 日 « 5月 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 アーカイブ
- 2018年5月
- 2017年9月
- 2017年8月
- 2017年7月
- 2017年6月
- 2017年5月
- 2017年2月
- 2017年1月
- 2016年12月
- 2016年7月
- 2016年6月
- 2016年1月
- 2015年12月
- 2015年11月
- 2015年10月
- 2015年9月
- 2015年8月
- 2015年7月
- 2015年6月
- 2015年5月
- 2015年4月
- 2015年3月
- 2015年2月
- 2015年1月
- 2014年12月
- 2014年11月
- 2014年6月
- 2014年5月
- 2014年4月
- 2014年3月
- 2014年2月
- 2014年1月
- 2013年12月
- 2013年11月
- 2013年9月
- 2013年8月
- 2013年7月
- 2013年6月
- 2013年5月
- 2013年4月
- 2013年3月
- 2013年2月
- 2013年1月
- 2012年12月
- 2012年10月
- 2012年5月
- 2010年6月
エントリ