Skip to content

Instantly share code, notes, and snippets.

@LeeDDHH
Last active January 22, 2020 12:15
Show Gist options
  • Save LeeDDHH/8f3403a04fa5a65ff9eecf90c56afd1d to your computer and use it in GitHub Desktop.
Save LeeDDHH/8f3403a04fa5a65ff9eecf90c56afd1d to your computer and use it in GitHub Desktop.

Android studio

既存のAndroid Studioをアンインストールする方法

# Android Studioの削除
$ rm -Rf /Applications/Android\ Studio.app

# Android Studioの環境設定の削除
$ rm -Rf ~/Library/Preferences/AndroidStudio*

# Android Studio の設定ファイル(plist)リストの削除
$ rm -Rf ~/Library/Preferences/com.google.android.*

# Android Studio のエミュレータ設定の削除
$ rm -Rf ~/Library/Preferences/com.android.*

# Android Studio のプラグインの削除
$ rm -Rf ~/Library/Application\ Support/AndroidStudio*

# Android Studioのログの削除
$ rm -Rf ~/Library/Logs/AndroidStudio*

# Android Studioの キャッチデータ削除
$ rm -Rf ~/Library/Caches/AndroidStudio*

# Android Studio古いバージョンの削除
$ rm -Rf ~/.AndroidStudio*

# Android Studio で作成したプロジェクトの削除
$ rm -Rf ~/AndroidStudioProjects

# ビルドシステムグラドルの削除
$ rm -Rf ~/.gradle

# Android Studio エミュレータの削除
$ rm -Rf ~/.android

# Android Studio SDK の削除
$ rm -Rf ~/Library/Android*

# エミュレーターの履歴削除
$ rm -Rf ~/.emulator_console_auth_token

Android studio install

Android Studioのインストールからエミュレーターの起動まで/Mac編 | CodeCampus

Flutter install

MacでFlutterの開発環境をAndroid Studioで構築する方法 - ブロックチェーンエンジニアとして生きる

flutter doctor 時に発生する注意文言の潰していく

# 表示例
$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, v1.14.4-pre.17, on Mac OS X 10.15.2 19C57, locale ja-JP)

[!] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    ✗ Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses
[✗] Xcode - develop for iOS and macOS
    ✗ Xcode installation is incomplete; a full installation is necessary for iOS development.
      Download at: https://developer.apple.com/xcode/download/
      Or install Xcode via the App Store.
      Once installed, run:
        sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
        sudo xcodebuild -runFirstLaunch
    ✗ CocoaPods installed but not working.
        You appear to have CocoaPods installed but it is not working.
        This can happen if the version of Ruby that CocoaPods was installed with is different from the one being used to invoke it.
        This can usually be fixed by re-installing CocoaPods. For more info, see https://github.com/flutter/flutter/issues/14293.
      To re-install CocoaPods, run:
        sudo gem install cocoapods
[!] Android Studio (version 3.5)
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
[!] VS Code (version 1.41.1)
    ✗ Flutter extension not installed; install from
      https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[!] Connected device
    ! No devices available
  • [!] Android toolchain - develop for Android devices
    • flutter doctor --android-licenses
      • Androidライセンスを承認する
  • [✗] Xcode - develop for iOS and macOS
    • sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
      • xcode-cliで使うデベロッパーディレクトリを切り替える
      • もとのディレクトリに戻すケースも考えて、事前に xcode-select -p でパスを控えておく
    • sudo xcodebuild -runFirstLaunch
      • xcode-cli使用時の同意と追加コンポーネントをインストールする
    • sudo gem install cocoapods
  • [!] Android Studio
    • Prefferences > Plugins まで移動し、 Flutter を検索してインストール
  • [!] VS Code
  • [!] Connected device ! No devices available
    • Android studio もしくは Xcodeからエミュレータを実行すると問題なし
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment