jenvとAndroidStudio導入環境でFlutterのコマンドラインツールが使うかもしれないJDKがいくつか共存していて、いったいなにが使われるのか疑問に思ったので調べた。 ・・・というか答えは flutter config に書かれています。 (snip) --jdk-dir The Java Development Kit (JDK) installation directory. If unset, flutter will search for one in the following order: 1) the JDK bundled with the latest installation of Android Studio, 2) the JDK found at the directory found in the JAVA_HOME environment var
![Flutterが使うJDKが特定されるルール](https://cdn-ak-scissors.b.st-hatena.com/image/square/d4588679ef34fbe7c2c960522b78051822a77160/height=288;version=1;width=512/https%3A%2F%2Ffanyv88.com%3A443%2Fhttps%2Fres.cloudinary.com%2Fzenn%2Fimage%2Fupload%2Fs--uXwP0fCo--%2Fc_fit%252Cg_north_west%252Cl_text%3Anotosansjp-medium.otf_55%3AFlutter%2525E3%252581%25258C%2525E4%2525BD%2525BF%2525E3%252581%252586JDK%2525E3%252581%25258C%2525E7%252589%2525B9%2525E5%2525AE%25259A%2525E3%252581%252595%2525E3%252582%25258C%2525E3%252582%25258B%2525E3%252583%2525AB%2525E3%252583%2525BC%2525E3%252583%2525AB%252Cw_1010%252Cx_90%252Cy_100%2Fg_south_west%252Cl_text%3Anotosansjp-medium.otf_37%3AKouta%252520Imanaka%252Cx_203%252Cy_121%2Fg_south_west%252Ch_90%252Cl_fetch%3AaHR0cHM6Ly9saDMuZ29vZ2xldXNlcmNvbnRlbnQuY29tL2EtL0FPaDE0R2kzaGJwWVI3RU8wajJleHpIUXdsVW1kQUJSdHIxVGdUcURCN1Z1VGc9czI1MC1j%252Cr_max%252Cw_90%252Cx_87%252Cy_95%2Fv1627283836%2Fdefault%2Fog-base-w1200-v2.png)