1
1
---
2
- title : Install help
3
- description : This page describes some common installation issues new Flutter users have run into and offers suggestions to resolve them.
2
+ title : Install troubleshooting
3
+ short-title : Troubleshoot
4
+ description : >-
5
+ Get help with common installation issues new Flutter developers have run into.
4
6
---
5
7
6
- This page describes some common installation issues new Flutter users have
8
+ This page describes some common installation issues new Flutter users have
7
9
encountered and offers suggestions on how to resolve them.
8
10
If you are still experiencing problems, consider reaching out to any of
9
11
the resources listed under [ community support channels] [ ] .
10
12
To add a topic to this page or make a correction,
11
13
you can file an issue or a pull request using the buttons at the top of the page.
12
14
13
- ## Get the Flutter SDK
15
+ [ community support channels ] : #community-support
14
16
17
+ ## Get the Flutter SDK
15
18
16
19
### Unable to find the ` flutter ` command
17
20
18
21
__ What does this issue look like?__
19
22
20
- When you try to run the ` flutter ` command,
21
- the console fails to find it.
23
+ When you try to run the ` flutter ` command,
24
+ the console fails to find it.
22
25
The error usually looks as follows:
23
26
24
27
``` plaintext
25
28
'flutter' is not recognized as an internal or external command operable program or batch file
26
29
```
27
30
28
- Error messages on macOS and Linux could look slightly different from
29
- the one on Windows.
31
+ Error messages on macOS and Linux could look slightly different from
32
+ the one on Windows.
30
33
31
34
__ Explanation and suggestions__
32
35
@@ -40,6 +43,9 @@ to identify the location of your `flutter` folder.
40
43
41
44
See also: [ Configuring PATH and Environment Variables - Dart Code] [ config path ]
42
45
46
+ [ windows path ] : https://www.wikihow.com/Change-the-PATH-Environment-Variable-on-Windows
47
+ [ set up VS Code ] : /get-started/editor
48
+ [ config path ] : https://dartcode.org/docs/configuring-path-and-environment-variables/
43
49
44
50
### Flutter in special folders
45
51
@@ -65,27 +71,27 @@ such as `C:\src\flutter`.
65
71
66
72
### Having multiple versions of Java installed
67
73
68
- __ What does this issue look like?__
74
+ __ What does this issue look like?__
69
75
70
76
The command ` flutter doctor --android-licenses ` fails.
71
77
Running ` flutter doctor –verbose ` gives an error message
72
78
like the following:
73
79
74
80
``` plaintext
75
- java.lang.UnsupportedClassVersionError: com/android/prefs/AndroidLocationsProvider
76
- has been compiled by a more recent version of the Java Runtime (class file version 55.0),
81
+ java.lang.UnsupportedClassVersionError: com/android/prefs/AndroidLocationsProvider
82
+ has been compiled by a more recent version of the Java Runtime (class file version 55.0),
77
83
this version of the Java Runtime only recognizes class file versions up to 52.0
78
84
```
79
85
80
86
__ Explanation and suggestions__
81
87
82
88
The error occurs when an older version of the
83
89
Java Development Kit (JDK)
84
- is installed on your computer.
90
+ is installed on your computer.
85
91
86
92
If you don't need multiple versions of Java,
87
93
uninstall existing JDKs from your computer.
88
- Flutter automatically uses the JDK included in Android Studio.
94
+ Flutter automatically uses the JDK included in Android Studio.
89
95
90
96
If you do need another version of Java,
91
97
try the workaround described in
@@ -96,6 +102,10 @@ check out the [Android Java Gradle migration guide][]
96
102
or [ flutter doctor --android-licenses not working due to
97
103
java.lang.UnsupportedClassVersionError - Stack Overflow] [ so java version ] .
98
104
105
+ [ java binary path ] : {{site.repo.flutter}}/issues/106416#issuecomment-1522198064
106
+ [ Android Java Gradle migration guide ] : /release/breaking-changes/android-java-gradle-migration-guide
107
+ [ so java version ] : {{site.so}}/questions/75328050/
108
+
99
109
### ` cmdline-tools ` component is missing
100
110
101
111
__ What does this issue look like?__
@@ -105,9 +115,9 @@ The `flutter doctor` command complains that the
105
115
For example:
106
116
107
117
``` plaintext noHighlight
108
- [!] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
109
- • Android SDK at C:\Users\My PC\AppData\Local\Android\sdk
110
- X cmdline-tools component is missing
118
+ [!] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
119
+ • Android SDK at C:\Users\My PC\AppData\Local\Android\sdk
120
+ X cmdline-tools component is missing
111
121
```
112
122
113
123
__ Explanation and suggestions__
@@ -116,20 +126,21 @@ The easiest way to get the cmdline-tools is through the
116
126
SDK Manager in Android Studio.
117
127
To do this, use the following instructions:
118
128
119
- 1 . Open the SDK Manager from Android Studio,
120
- by selecting ** Tools > SDK Manager** from the menu bar.
129
+ 1 . Open the SDK Manager from Android Studio by
130
+ selecting ** Tools > SDK Manager** from the menu bar.
121
131
2 . Select the latest Android SDK
122
132
(or a specific version that your app requires),
123
- Android SDK Command-line Tools, and Android SDK Build-Tools.
133
+ Android SDK Command-line Tools, and Android SDK Build-Tools.
124
134
3 . Click ** Apply** to install the selected artifacts.
125
135
126
- ![ Android Studio SDK
127
- Manager] ( /assets/images/docs/get-started/install_android_tools.png )
136
+ ![ Android Studio SDK Manager] ( /assets/images/docs/get-started/install_android_tools.png )
128
137
129
138
If you're not using Android Studio,
130
139
you can download the tools using the
131
140
[ sdkmanager] [ ] command-line tool.
132
141
142
+ [ sdkmanager ] : {{site.android-dev}}/studio/command-line/sdkmanager
143
+
133
144
## macOS setup
134
145
135
146
### SocketException: Send failed, OS Error: No route to host, errno = 65
@@ -187,11 +198,11 @@ exit code: 69
187
198
188
199
__ Explanation and suggestions__
189
200
190
- This issue is related to networking.
191
- Try the following instructions to troubleshoot:
201
+ This issue is related to networking.
202
+ Try the following instructions to troubleshoot:
192
203
193
204
* Check your internet connection.
194
- Make sure that you are connected to the
205
+ Make sure that you're connected to the
195
206
internet and that your connection is stable.
196
207
* Restart your devices, including your computer
197
208
and networking equipment.
@@ -202,6 +213,8 @@ Try the following instructions to troubleshoot:
202
213
with the ` flutter doctor -v ` command and ask for help in
203
214
one of the [ community support channels] [ ] .
204
215
216
+ [ community support channels ] : #community-support
217
+
205
218
## Community support
206
219
207
220
The Flutter community is helpful and welcoming.
@@ -210,21 +223,13 @@ consider asking for support from one of the following channels:
210
223
211
224
* [ /r/flutterhelp] ( https://www.reddit.com/r/flutterhelp/ ) on Reddit
212
225
* [ /r/flutterdev] ( https://discord.gg/rflutterdev ) on Discord,
213
- particularly the ` install-and-setup ` channel on this server.
214
- * [ StackOverflow] [ ] ,
226
+ particularly the ` install-and-setup ` channel on this server.
227
+ * [ StackOverflow] [ ] ,
215
228
in particular, questions tagged with [ #flutter] [ ] or [ #dart] [ ] .
216
229
217
230
To be respectful of everyone's time,
218
- search the archive for a similar issue before posting a new one.
231
+ search the archive for a similar issue before posting a new one.
219
232
220
233
[ StackOverflow ] : {{site.so}}
221
234
[ #dart ] : {{site.so}}/questions/tagged/dart
222
235
[ #flutter ] : {{site.so}}/questions/tagged/flutter
223
- [ Android Java Gradle migration guide ] : /release/breaking-changes/android-java-gradle-migration-guide
224
- [ community support channels ] : #community-support
225
- [ java binary path ] : {{site.repo.flutter}}/issues/106416#issuecomment-1522198064
226
- [ so java version ] : {{site.so}}/questions/75328050/
227
- [ set up VS Code ] : /get-started/editor
228
- [ config path ] : https://dartcode.org/docs/configuring-path-and-environment-variables/
229
- [ sdkmanager ] : {{site.android-dev}}/studio/command-line/sdkmanager
230
- [ windows path ] : https://www.wikihow.com/Change-the-PATH-Environment-Variable-on-Windows
0 commit comments