差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
android:flutter [2023/03/26 19:39] – [Fedora で Flutter CLI がハングする😱] ともやんandroid:flutter [2025/03/17 21:44] (現在) – [インストール] ともやん
行 2: 行 2:
 本家: [[https://flutter.dev|Flutter - Build apps for any screen]]\\ 本家: [[https://flutter.dev|Flutter - Build apps for any screen]]\\
 ※Fedora 上では上手く動作していないので調査ちぅ😅\\ ※Fedora 上では上手く動作していないので調査ちぅ😅\\
 +
 +[[android:dart|Dart 言語]]\\
  
 ===== インストール ===== ===== インストール =====
行 8: 行 10:
 これは Linux である Fedora での手順です。\\ これは Linux である Fedora での手順です。\\
 [[https://docs.flutter.dev/get-started/install/linux|Linux install - Flutter documentation]]\\ [[https://docs.flutter.dev/get-started/install/linux|Linux install - Flutter documentation]]\\
 +[[https://docs.flutter.dev/get-started/install/linux/android|Make Android apps | Flutter]] [[gtr>https://docs.flutter.dev/get-started/install/linux/android|翻訳]]\\
  
 ==== システム要件 ==== ==== システム要件 ====
行 14: 行 17:
 **Tools:** Flutter が依存するこれらのコマンドライン ツール\\ **Tools:** Flutter が依存するこれらのコマンドライン ツール\\
 <code> <code>
-bash +bash curl file git2.x mkdir rm unzip which xz-utils zip
-curl +
-file +
-git2.x +
-mkdir +
-rm +
-unzip +
-which +
-xz-utils +
-zip+
 </code> </code>
 **共有ライブラリ:** Flutter test コマンドは、以下のこのライブラリに依存する。\\ **共有ライブラリ:** Flutter test コマンドは、以下のこのライブラリに依存する。\\
行 32: 行 26:
 <WRAP color_term> <WRAP color_term>
 <WRAP color_command><html><pre> <WRAP color_command><html><pre>
-<b class=GRN>$</b> <b class=HIY>sudo</b> dnf install bash curl file git unzip xz zip mesa-libGLU clang+<font color="#0087FF"><b>$</b></font> <font color="#26A269"><u style="text-decoration-style:solid">sudo</u></font> <font color="#26A269">dnf</font> install <font color="#A347BA">-y</font> bash curl file git unzip xz zip mesa-libGLU clang
 </pre></html></WRAP> </pre></html></WRAP>
-<WRAP color_result_long><html><pre>+<WRAP color_result_hlong><html><pre>
 メタデータの期限切れの最終確認: 1:31:15 時間前の 2023年02月26日 10時30分08秒 に実施しました。 メタデータの期限切れの最終確認: 1:31:15 時間前の 2023年02月26日 10時30分08秒 に実施しました。
 パッケージ bash-5.2.15-1.fc37.x86_64 は既にインストールされています。 パッケージ bash-5.2.15-1.fc37.x86_64 は既にインストールされています。
行 65: 行 59:
 ダウンロードサイズの合計: 39 M ダウンロードサイズの合計: 39 M
 インストール後のサイズ: 212 M インストール後のサイズ: 212 M
-これでよろしいですか? [y/N]: y 
 パッケージのダウンロード: パッケージのダウンロード:
 (1/7): clang-15.0.7-1.fc37.x86_64.rpm                                         148 kB/s |  75 kB     00:00     (1/7): clang-15.0.7-1.fc37.x86_64.rpm                                         148 kB/s |  75 kB     00:00    
行 105: 行 98:
  
 完了しました! 完了しました!
-<pre></html></WRAP>+</pre></html></WRAP> 
 +</WRAP> 
 + 
 +<WRAP color_term> 
 +<WRAP color_command><html><pre> 
 +<font color="#0087FF"><b>$</b></font> <font color="#26A269"><u style="text-decoration-style:solid">sudo</u></font> <font color="#26A269">dnf</font> install glibc libstdc++ zlib-ng-compat bzip2-libs 
 +</pre></html></WRAP> 
 +<WRAP color_result><html><pre> 
 +リポジトリの更新を読み込み中: 
 +リポジトリを読み込みました。 
 +Package &quot;glibc-2.40-21.fc41.x86_64&quot; is already installed. 
 +Package &quot;glibc-2.40-21.fc41.i686&quot; is already installed. 
 +Package &quot;libstdc++-14.2.1-7.fc41.x86_64&quot; is already installed. 
 +Package &quot;libstdc++-14.2.1-7.fc41.i686&quot; is already installed. 
 +Package &quot;zlib-ng-compat-2.2.3-2.fc41.x86_64&quot; is already installed. 
 +Package &quot;zlib-ng-compat-2.2.3-2.fc41.i686&quot; is already installed. 
 +Package &quot;bzip2-libs-1.0.8-19.fc41.x86_64&quot; is already installed. 
 +Package &quot;bzip2-libs-1.0.8-19.fc41.i686&quot; is already installed. 
 + 
 +Nothing to do. 
 +</pre></html></WRAP>
 </WRAP> </WRAP>
  
行 112: 行 125:
 <WRAP color_term> <WRAP color_term>
 <WRAP color_command><html><pre> <WRAP color_command><html><pre>
-<b class=GRN>$</b> <b class=HIY>git</b> clone <b class=HIK>--depth</b> 1 https://github.com/flutter/flutter.git +<font color="#0087FF"><b>$</b></font> <font color="#26A269">git</font> clone <font color="#A347BA">--depth</font> 1 https://github.com/flutter/flutter.git</pre></html></WRAP>
-</pre></html></WRAP>+
 <WRAP color_result><html><pre> <WRAP color_result><html><pre>
-Cloning into 'flutter'... +Cloning into &apos;flutter&apos;... 
-remote: Enumerating objects: 7438, done. +remote: Enumerating objects: 15704, done. 
-remote: Counting objects: 100% (7438/7438), done. +remote: Counting objects: 100% (15704/15704), done. 
-remote: Compressing objects: 100% (5718/5718), done. +remote: Compressing objects: 100% (12711/12711), done. 
-remote: Total 7438 (delta 1989), reused 3479 (delta 1178), pack-reused 0 +remote: Total 15704 (delta 3401), reused 7860 (delta 2189), pack-reused 0 (from 0) 
-Receiving objects: 100% (7438/7438), 10.95 MiB | 1.04 MiB/s, done. +Receiving objects: 100% (15704/15704), 32.71 MiB | 11.17 MiB/s, done. 
-Resolving deltas: 100% (1989/1989), done.+Resolving deltas: 100% (3401/3401), done. 
 +Updating files: 100% (14566/14566), done.
 </pre></html></WRAP> </pre></html></WRAP>
 </WRAP> </WRAP>
行 128: 行 141:
 <WRAP color_command><html><pre> <WRAP color_command><html><pre>
 <b class=GRN>$</b> <b class=HIY>git</b> clone <b class=HIK>--depth</b> 1 https://github.com/flutter/flutter.git -b stable <b class=GRN>$</b> <b class=HIY>git</b> clone <b class=HIK>--depth</b> 1 https://github.com/flutter/flutter.git -b stable
-</pre></html></WRAP> 
-<WRAP color_result><html><pre> 
 </pre></html></WRAP> </pre></html></WRAP>
 </WRAP> </WRAP>
行 156: 行 167:
 <WRAP color_term> <WRAP color_term>
 <WRAP color_command><html><pre> <WRAP color_command><html><pre>
-<b class=GRN>$</b> <b class=HIY>mkdir</b> ~/development && <b class=HIY>cd</b> ~/development +<font color="#0087FF"><b>$</b></font> <font color="#26A269">mkdir</font> ~/development <font color="#2A7BDE"><b>&amp;&amp;</b></font> <font color="#26A269">cd</font> ~/development 
-<b class=GRN>$</b> <b class=HIY>curl</b> <b class=HIK>-LOC -</b> https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.7.8-stable.tar.xz+<font color="#0087FF"><b>$</b></font> <font color="#26A269">curl</font> <font color="#A347BA">-LOC</font> <font color="#A347BA">-</font> https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.29.2-stable.tar.xz
 </pre></html></WRAP> </pre></html></WRAP>
 <WRAP color_result><html><pre> <WRAP color_result><html><pre>
行 169: 行 180:
 <WRAP color_term> <WRAP color_term>
 <WRAP color_command><html><pre> <WRAP color_command><html><pre>
-<b class=GRN>$</b> <b class=HIY>tar</b> xvf flutter_linux_3.7.8-stable.tar.xz+<b class=GRN>$</b> <b class=HIY>tar</b> xvf flutter_linux_3.29.2-stable.tar.xz
 </pre></html></WRAP> </pre></html></WRAP>
 <WRAP color_result_long><html><pre> <WRAP color_result_long><html><pre>
行 11760: 行 11771:
 </WRAP> </WRAP>
  
-flutter ツールをパスに追加する🤔\\ 
-<WRAP color_term> 
-<WRAP color_command><html><pre> 
-<b class=GRN>$</b> <b class=HIY>export</b> PATH="$PATH:`pwd`/flutter/bin" 
-</pre></html></WRAP> 
-<WRAP color_result><html><pre> 
-</pre></html></WRAP> 
-</WRAP> 
- 
-flutter ツールをパスに追加する🤔\\ 
-<WRAP color_term> 
-<WRAP color_command><html><pre> 
-<b class=GRN>$</b> <b class=HIY>export</b> PATH="$PATH:`pwd`/flutter/bin" 
-</pre></html></WRAP> 
-<WRAP color_result><html><pre> 
-</pre></html></WRAP> 
-</WRAP> 
  
 ==== Flutter SDK の入手 (Snap 編) ==== ==== Flutter SDK の入手 (Snap 編) ====
行 11818: 行 11812:
 <WRAP color_result><html><pre> <WRAP color_result><html><pre>
 /home/tomoyan/snap/flutter/common/flutter /home/tomoyan/snap/flutter/common/flutter
 +</pre></html></WRAP>
 +</WRAP>
 +
 +==== 設定 ====
 +flutter ツールをパスに追加する🤔\\
 +<WRAP color_term>
 +<WRAP color_command><html><pre>
 +<font color="#0087FF"><b>$</b></font> <font color="#33C7DE"><b>export</b></font> PATH=<font color="#A2734C">&quot;</font><font color="#2A7BDE"><b>`</b></font><font color="#26A269">pwd</font><font color="#2A7BDE"><b>`</b></font><font color="#A2734C">/flutter/bin:</font><font color="#A347BA">$PATH</font><font color="#A2734C">&quot;</font>
 +<font color="#0087FF"><b>$</b></font> <font color="#26A269">echo</font> <font color="#A2734C">&apos;export PATH=&apos;</font><font color="#2A7BDE"><b>`</b></font><font color="#26A269">pwd</font><font color="#2A7BDE"><b>`</b></font><font color="#A2734C">&apos;/flutter/bin:$PATH&apos;</font> <font color="#2A7BDE"><b>&gt;&gt;</b></font> <u style="text-decoration-style:solid">~/.zshrc</u>
 +<font color="#0087FF"><b>$</b></font> <font color="#26A269">flutter</font> <font color="#A347BA">-h</font>
 +</pre></html></WRAP>
 +<WRAP color_result><html><pre>
 +Downloading Linux x64 Dart SDK from Flutter engine 082a761570e89f67a56f50de1c4cb843a2e452af...
 +  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
 +                                 Dload  Upload   Total   Spent    Left  Speed
 +100  189M  100  189M    0      10.3M      0  0:00:18  0:00:18 --:--:-- 10.8M
 +Building flutter tool...
 +Resolving dependencies... <font color="#8A8A8A">(1.4s)</font>
 +Downloading packages... <font color="#8A8A8A">(5.2s)</font>
 +Got dependencies.
 +Manage your Flutter app development.
 +
 +Common commands:
 +
 +  flutter create &lt;output directory&gt;
 +    Create a new Flutter project in the specified directory.
 +
 +  flutter run [options]
 +    Run your Flutter application on an attached device or in an emulator.
 +
 +Usage: flutter &lt;command&gt; [arguments]
 +
 +Global options:
 +-h, --help                  Print this usage information.
 +-v, --verbose               Noisy logging, including all shell commands executed.
 +                            If used with &quot;--help&quot;, shows hidden options. If used with &quot;flutter doctor&quot;, shows
 +                            additional diagnostic information. (Use &quot;-vv&quot; to force verbose logging in those
 +                            cases.)
 +-d, --device-id             Target device id or name (prefixes allowed).
 +    --version               Reports the version of this tool.
 +    --enable-analytics      Enable telemetry reporting each time a flutter or dart command runs.
 +    --disable-analytics     Disable telemetry reporting each time a flutter or dart command runs, until it is
 +                            re-enabled.
 +    --suppress-analytics    Suppress analytics reporting for the current CLI invocation.
 +
 +Available commands:
 +
 +Flutter SDK
 +  bash-completion   Output command line shell completion setup scripts.
 +  channel           List or switch Flutter channels.
 +  config            Configure Flutter settings.
 +  doctor            Show information about the installed tooling.
 +  downgrade         Downgrade Flutter to the last active version for the current channel.
 +  precache          Populate the Flutter tool&apos;s cache of binary artifacts.
 +  upgrade           Upgrade your copy of Flutter.
 +
 +Project
 +  analyze           Analyze the project&apos;s Dart code.
 +  assemble          Assemble and build Flutter resources.
 +  build             Build an executable app or install bundle.
 +  clean             Delete the build/ and .dart_tool/ directories.
 +  create            Create a new Flutter project.
 +  drive             Builds and installs the app, and runs a Dart program that connects to the app, often to run
 +                    externally facing integration tests, such as with package:test and package:flutter_driver.
 +  gen-l10n          Generate localizations for the current project.
 +  pub               Commands for managing Flutter packages.
 +  run               Run your Flutter app on an attached device.
 +  test              Run Flutter unit tests for the current project.
 +
 +Tools &amp; Devices
 +  attach            Attach to a running app.
 +  custom-devices    List, reset, add and delete custom devices.
 +  devices           List all connected devices.
 +  emulators         List, launch and create emulators.
 +  install           Install a Flutter app on an attached device.
 +  logs              Show log output for running Flutter apps.
 +  screenshot        Take a screenshot from a connected device.
 +  symbolize         Symbolize a stack trace from an AOT-compiled Flutter app.
 +
 +Run &quot;flutter help &lt;command&gt;&quot; for more information about a command.
 +Run &quot;flutter help -v&quot; for verbose help output, including less commonly used options.
 +</pre></html></WRAP>
 +</WRAP>
 +
 +<WRAP color_term>
 +<WRAP color_command><html><pre>
 +<font color="#0087FF"><b>$</b></font> <font color="#26A269">flutter</font> doctor
 +</pre></html></WRAP>
 +<WRAP color_result><html><pre><div class=BSc>
 +
 +<b>  ╔════════════════════════════════════════════════════════════════════════════╗</b>
 +<b>  ║                 Welcome to Flutter! - https://flutter.dev                  ║</b>
 +<b>  ║                                                                            ║</b>
 +<b>  ║ The Flutter tool uses Google Analytics to anonymously report feature usage ║</b>
 +<b>  ║ statistics and basic crash reports. This data is used to help improve      ║</b>
 +<b>  ║ Flutter tools over time.                                                   ║</b>
 +<b>  ║                                                                            ║</b>
 +<b>  ║ Flutter tool analytics are not sent on the very first run. To disable      ║</b>
 +<b>  ║ reporting, type &apos;flutter config --no-analytics&apos;. To display the current    ║</b>
 +<b>  ║ setting, type &apos;flutter config&apos;. If you opt out of analytics, an opt-out    ║</b>
 +<b>  ║ event will be sent, and then no further information will be sent by the    ║</b>
 +<b>  ║ Flutter tool.                                                              ║</b>
 +<b>  ║                                                                            ║</b>
 +<b>  ║ By downloading the Flutter SDK, you agree to the Google Terms of Service.  ║</b>
 +<b>  ║ The Google Privacy Policy describes how data is handled in this service.   ║</b>
 +<b>  ║                                                                            ║</b>
 +<b>  ║ Moreover, Flutter includes the Dart SDK, which may send usage metrics and  ║</b>
 +<b>  ║ crash reports to Google.                                                   ║</b>
 +<b>  ║                                                                            ║</b>
 +<b>  ║ Read about data we send with crash reports:                                ║</b>
 +<b>  ║ https://flutter.dev/to/crash-reporting                                     ║</b>
 +<b>  ║                                                                            ║</b>
 +<b>  ║ See Google&apos;s privacy policy:                                               ║</b>
 +<b>  ║ https://policies.google.com/privacy                                        ║</b>
 +<b>  ║                                                                            ║</b>
 +<b>  ║ To disable animations in this tool, use                                    ║</b>
 +<b>  ║ &apos;flutter config --no-cli-animations&apos;                                     ║</b>
 +<b>  ╚════════════════════════════════════════════════════════════════════════════╝</b>
 +</div>
 +
 +Downloading Material fonts...                                      426ms
 +Downloading Gradle Wrapper...                                       26ms
 +Downloading package sky_engine...                                  296ms
 +Downloading package flutter_gpu...                                 140ms
 +Downloading flutter_patched_sdk tools...                           455ms
 +Downloading flutter_patched_sdk_product tools...                   454ms
 +Downloading linux-x64 tools...                                      3.4s
 +Downloading linux-x64/font-subset tools...                         295ms
 +Doctor summary (to see all details, run flutter doctor -v):
 +<font color="#A2734C">[!]</font> Flutter (Channel master, 0.0.0-unknown, on Fedora Linux 41 (Forty One) 6.13.4-200.fc41.x86_64, locale
 +    ja_JP.UTF-8)
 +<b>    </b><font color="#E9AD0C"><b>!</b></font><b> Flutter version 0.0.0-unknown on channel master at /home/tomoyan/development/flutter</b>
 +<b>      Cannot resolve current version, possibly due to local changes.</b>
 +<b>      Reinstall Flutter by following instructions at https://flutter.dev/setup.</b>
 +<b>    </b><font color="#E9AD0C"><b>!</b></font><b> The flutter binary is not on your path. Consider adding /home/tomoyan/development/flutter/bin to your path.</b>
 +<b>    </b><font color="#E9AD0C"><b>!</b></font><b> The dart binary is not on your path. Consider adding /home/tomoyan/development/flutter/bin to your path.</b>
 +<font color="#C01C28">[✗]</font> Android toolchain - develop for Android devices
 +<b>    </b><font color="#F66151"><b>✗</b></font><b> Unable to locate Android SDK.</b>
 +<b>      Install Android Studio from: https://developer.android.com/studio/index.html</b>
 +<b>      On first launch it will assist you in installing the Android SDK components.</b>
 +<b>      (or visit https://flutter.dev/to/linux-android-setup for detailed instructions).</b>
 +<b>      If the Android SDK has been installed to a custom location, please use</b>
 +<b>      `flutter config --android-sdk` to update to that location.</b>
 +
 +<font color="#C01C28">[✗]</font> Chrome - develop for the web (Cannot find Chrome executable at google-chrome)
 +<b>    </b><font color="#E9AD0C"><b>!</b></font><b> Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.</b>
 +<font color="#C01C28">[✗]</font> Linux toolchain - develop for Linux desktop
 +<b>    </b><font color="#F66151"><b>✗</b></font><b> clang++ is required for Linux development.</b>
 +<b>      It is likely available from your distribution (e.g.: apt install clang), or can be downloaded from</b>
 +<b>      https://releases.llvm.org/</b>
 +<b>    </b><font color="#F66151"><b>✗</b></font><b> ninja is required for Linux development.</b>
 +<b>      It is likely available from your distribution (e.g.: apt install ninja-build), or can be downloaded from</b>
 +<b>      https://github.com/ninja-build/ninja/releases</b>
 +<b>    </b><font color="#F66151"><b>✗</b></font><b> GTK 3.0 development libraries are required for Linux development.</b>
 +<b>      They are likely available from your distribution (e.g.: apt install libgtk-3-dev)</b>
 +<b>    </b><font color="#E9AD0C"><b>!</b></font><b> Unable to access driver information using &apos;eglinfo&apos;.</b>
 +<b>      It is likely available from your distribution (e.g.: apt install mesa-utils)</b>
 +<font color="#A2734C">[!]</font> Android Studio (not installed)
 +<font color="#26A269">[✓]</font> Connected device (1 available)
 +<font color="#26A269">[✓]</font> Network resources
 +
 +<font color="#A2734C">!</font> Doctor found issues in 5 categories.
 </pre></html></WRAP> </pre></html></WRAP>
 </WRAP> </WRAP>
  • android/flutter.1679827197.txt.gz
  • 最終更新: 2023/03/26 19:39
  • by ともやん