Xcode アップデートで Android Studio から git が使えない

MacOSのアップデートの後, AndroidStudio にてこんなダイアログ.

cannot_git

Can't start Git: /usr/bin/git
Probably the path to Git executable is not valid.

見えてない?


$ which git
/usr/bin/git

権限?


$ brew doctor

Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.

Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!

Warning: You have an outdated version of /usr/bin/install_name_tool installed.
This will cause binary package installations to fail.
This can happen if you install osx-gcc-installer or RailsInstaller.
To restore it, you must reinstall OS X or restore the binary from
the OS packages.

Warning: Git could not be found in your PATH.
Homebrew uses Git for several internal functions, and some formulae use Git
checkouts instead of stable tarballs. You may want to install Git:
  brew install git

Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.

Warning: You have not agreed to the Xcode license.
Builds will fail! Agree to the license by opening Xcode.app or running:
    xcodebuild -license

Warning: Some keg-only formula are linked into the Cellar.
Linking a keg-only formula, such as gettext, into the cellar with
`brew link <formula>` will cause other formulae to detect them during
the `./configure` step. This may cause problems when compiling those
other formulae.

Binaries provided by keg-only formulae may override system binaries

git は入っているので, おもむろに


$ sudo xcodebuild -license

...
9.12    Entire Agreement; Governing Language
This Agreement constitutes the entire agreement between the parties with respect to the use of the SDK licensed hereunder and supersedes all prior understandings regarding such subject matter. This Agreement may be modified only: (a) by a written amendment signed by both parties, or (b) to the extent expressly permitted by this Agreement (for example, by Apple by written or email notice to You). Any translation of this Agreement is done for local requirements and in the event of a dispute between the English and any non-English version, the English version of this Agreement shall govern. If You are located in the province of Quebec, Canada, the following clause applies: The parties hereby confirm that they have requested that this Agreement and all related documents be drafted in English. Les parties ont exigé que le présent contrat et tous les documents connexes soient rédigés en anglais.
...

By typing 'agree' you are agreeing to the terms of the software license agreements. Type 'print' to print them or anything else to cancel, [agree, print, cancel]          

agree

$ brew update

あ, いけたわ.

Git_executed_successfully_and_Preferences


Google 日本語入力 で Shift キーを押さずに 大文字英文字 を入力する方法

あー, これ便利だわー.

ひらがなの入力モードで「や」をフリックすると、すっごくいろいろなカッコが入れられるんですよ。左にフリックすると「(」、右にフリックすると「)」が入れられます。さらに変換候補には様々なカッコも表示されます。

このQWERTYキーボードの「QWERTYUIOP」を上にフリックさせると、それぞれ「1234567890」を入れることができるんですよ。

【Android】Google日本語入力は「や」の左右フリック、QWERTYの上フリックがとても便利! | 明日やります

20140928-191413

20140928-191435

英文字と数字て一緒に使うことのが多くて切替えるの面倒だったので楽になります.

しかも, この英数(QWER)キーボードでボタンを下にスワイプすると, 大文字が表示されましたよ.

20140928-191501

20140928-191515

20140928-191530

ユーザIDとかパスワードとか, 入力するのがさらに簡単になります.

もしかして, いまさら?(笑)


Androidでダウンロードしたファイルの正しい一括削除の方法

フツーにどうやればいいのか分からなかったのですが.

「Files by Google」って「ファイル(マネージャ)」アプリと何が違うの?

アプリのアイコンの中にありますよね「ダウンロード」ってやつ. 最初から入ってるやつ.

20140926-123525

開けてみるとゴミだらけ.

20140926-123621

選択していくけど数が多すぎてダルい.

20140926-124513

ネットで調べてみると何かアプリを使ったらいいと書いてる.

「ファイルマネージャー」系のアプリを使って、SDカード内のPDFファイルを探して、削除をすればデータは完全に削除できます!

※スマホでは標準ブラウザからダウンロードした画像はSDカード内の「download」フォルダに保存される仕様です。そのSDカードフォルダを閲覧・編集するのに〔ファイルマネージャー系アプリ〕が必要になります。今回は「ES ファイルエクスプローラー」を例とします。

ファイルマネージャーなアプリを開くとそこに「Download」というフォルダがある, と.

20140926-124208

ここで全選択して一括で削除する, と.

20140926-124748

20140926-124829

20140926-124855

これで, スッキリしたように見えるが, 最初の「ダウンロード」アイコンからみてみると,

20140926-125057

全部, 残ってる. というか残ってるように見えてる. ファイルの実体はない.

これもきれいに消したい場合は,「設定」-「アプリ」-「すべてのアプリ」から「ダウンロードマネージャー」を開いて「データを消去」.

20140926-131511

20140926-131314

20140926-130157

「ダウンロード」アイコンから, もう一度見てみると

20140926-130252

これでスッキリですが, これも面倒くさいですね(笑)

追記:2018-12-04

きっと、今のおすすめはこの方法。

「Files by Google」って「ファイル(マネージャ)」アプリと何が違うの?

おすすめ:
→ 通知が表示されない とかどうせブロックの設定だろ! → 原因「フィルター」

Deleting files from Downloads folder - Android Forums at AndroidCentral.com


「LINEウェブストアにログインできませんでした」てうざくね?

なんかたくさんくるんだけども

20140821-142630

IPアドレスを表示してリンクになってるけど, そこにアクセスしろ, ってことに見えるけどなんか意味あるのだろうか.

IPアドレスを検索してみるとそこはインドネシア.

IPアドレス&所在地検索_IP_Geolocation_Search

IPアドレス&所在地検索 IP Geolocation Search

まあ, どちらにしろ自分ではないのはわかってる.

そして, ヘルプページにいく.

20140824-183645

第三者にログインされてない場合は, このLINEからのメッセージは来続けるのか.

「パスワード変更」を促されるけど, パスワードを変更しても, このメッセージてくるんだろ?

かんたんな文字列のパスワードを設定している人への警告にはなるのか.

ふと, 自分のスマホのIPアドレスなんだろうと, 簡単に調べてみたら, なんと Google-Proxy とか.

20140824-184711

診断くん

2013年3月6日 の記事とか, あたしは化石か.

Chrome for Androidのベータに、モバイルのChromeユーザのWeb閲覧を高速化し帯域を節約するための新機能を実装した、と発表した。それは一種のプロキシサーバ機能で、この機能をonにしておくと、ユーザのWebリクエストとそれに対するレスポンスがすべてGoogleのサーバを経由するようになり、そこでGoogleは同社のPageSpeedライブラリを使ってコンテンツを圧縮し最適化する。

Chrome for AndroidではWeb通信がGoogleのプロキシサーバを経由する - TechCrunch

正しいIPアドレスは FORWARD系の情報として表示されてる.

20140824-185349

フツーに端末で,「設定」-「端末の状態」で見れるのか.

20140824-185931

あ,

で, LINEのメッセージ止めるのはどうしたらいいんだたけか.

メールアドレスの変更しかないの?

関係者の方はご苦労様です.


Youtube Player を Fragment に埋め込む

今や公開されてるAPIも多すぎて...

プレーヤーを WebView なしで埋め込みたいだけなのに...

YouTube_—_Google_Developers

YouTube — Google Developers

いちいち調べるのが面倒なので手順メモ.

・ libs/ 以下にタウンドードした jar を置く.

dependencies {
    compile files('libs/YouTubeAndroidPlayerApi.jar')
}

・ API11+ であれば全て使える.
DEVELOPER_KEY を取得する必要がある.

・ 画面の回転時の再読み込みを AndroidManifest.xml で考慮.

    <activity
        ...
        android:screenOrientation="nosensor"
        android:configChanges="orientation|screenSize|keyboardHidden”>

・ YouTubeFailureRecoveryActivity 作成する.

public abstract class YouTubeFailureRecoveryActivity extends YouTubeBaseActivity implements
    YouTubePlayer.OnInitializedListener {

  private static final int RECOVERY_DIALOG_REQUEST = 1;

  @Override
  public void onInitializationFailure(YouTubePlayer.Provider provider,
      YouTubeInitializationResult errorReason) {
    if (errorReason.isUserRecoverableError()) {
      errorReason.getErrorDialog(this, RECOVERY_DIALOG_REQUEST).show();
    } else {
      String errorMessage = String.format(getString(R.string.error_player), errorReason.toString());
      Toast.makeText(this, errorMessage, Toast.LENGTH_LONG).show();
    }
  }

  @Override
  protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    if (requestCode == RECOVERY_DIALOG_REQUEST) {
      // Retry initialization if user performed a recovery action
      getYouTubePlayerProvider().initialize(DeveloperKey.DEVELOPER_KEY, this);
    }
  }

  protected abstract YouTubePlayer.Provider getYouTubePlayerProvider();

}

・ Activity の親に YouTubeFailureRecoveryActivity を.

public class PlayerViewDemoActivity extends YouTubeFailureRecoveryActivity {

  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.playerview_demo);

    // 処理開始
    YouTubePlayerView youTubeView = (YouTubePlayerView) findViewById(R.id.youtube_view);
    youTubeView.initialize(DeveloperKey.DEVELOPER_KEY, this);
  }

  @Override
  public void onInitializationSuccess(YouTubePlayer.Provider provider, YouTubePlayer player,
      boolean wasRestored) {
    if (!wasRestored) {
      player.cueVideo("wKJ9KzGQq0w”); // 動画ID
    }
  }

  @Override
  protected YouTubePlayer.Provider getYouTubePlayerProvider() {
    return (YouTubePlayerView) findViewById(R.id.youtube_view); // プレーヤーID
  }

}

・ レイアウト (layout/playerview_demo.xml)

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

  <TextView
      android:layout_width="match_parent"
      android:layout_height="0dp"
      android:layout_weight="1"
      android:textAppearance="@android:style/TextAppearance.Small"
      android:gravity="center"
      android:text="@string/playerview_text"/>

  <com.google.android.youtube.player.YouTubePlayerView
      android:id="@+id/youtube_view"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"/>

</LinearLayout>

という雰囲気.

Fragment 内に埋め込むなら, Activity が固定されてるものとして,

   @Override
   public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

     int section = getArguments().getInt(ARG_SECTION_NUMBER);
     View rootView = inflater.inflate(R.layout.playerview_demo, container, false);


     // 処理開始
     YouTubePlayerView youTubeView = (YouTubePlayerView) rootview.findViewById(R.id.youtube_view);

     youTubePlayerFragment.initialize(DeveloperKey.DEVELOPER_KEY,
                                      (YouTubePlayer.OnInitializedListener)getActivity());
   }

YouTube Android Player API - YouTube — Google Developers
サンプルアプリケーション - YouTube — Google Developers