No Connected Devices Found in a Flutter App in Android Studio
I finally solved the issue !!!
The following is steps I took to solve the problem:
- Deleted Android Studio and all of related folders in the computer.
2-1. Create "src" folder in the C drive.
2-2. C:\src> git clone https://github.com/flutter/flutter.git -b stable
2-1. Type "Environment Variables" in the search box in your computer.
2-2. Under "System Variables > Path", add "C/src/flutter/bin
".
- Install "Android Studio"
3-1. Android Studio Intro Page > Configure > SDK Manager
3-2. Android Studio > Configure > Plugins > Browse Repositories (Install Dart & Flutter)
- Go to "C:\src\flutter".
4-1. Run "flutter doctor --android-licenses
"
4-2. Run "flutter channel beta
"
4-3. Run "flutter upgrade
"
- Type "Environment Variables" in the search box in your computer.
5-2. Under "System Variables > Path", add the following:
C:\Users\USER\AppData\Local\Android\Sdk
C:\Users\USER\AppData\Local\Android\Sdk\platform-tools
C:\Users\USER\AppData\Local\Android\Sdk\tools
5-3. Under "System Variables", add the following:
- Variable Name : "
ANDROID_SDK_ROOT
" - Variable Value : "
C:\Users\USER\AppData\Local\Android\Sdk
"
- Go to "C:\src\flutter".
6-1. Run "
flutter config --android-sdk C:\Users\USER\AppData\Local\Android\Sdk
"
- Open Android Studio.
7-1. Ctrl
+ Shift
+ Alt
+ S
> Project Settings > Project > Change "<No SDK>
" to the latest version.
7-2. Click "AVD Manager" icon.
7-3. Click "Launch this AVD in the emulato" icon
- Success!
![Lim](https://lh3.googleusercontent.com/-Mvz2ZtpOjAw/AAAAAAAAAAI/AAAAAAAAABo/tEdnGFHpkck/photo.jpg=k-s256)
Comments
-
Lim over 1 year
I read StackOverflow questions including the following ones:
BUT, I couldn't solve my issue....... :-(
My Flutter folder structure
-
D:\src\flutter
-
D:\src\sdk
My Project folder location :
D:\__GitHub
Flutter SDK Setup Steps
-
Add the following User environment variable
-
Variable Name :
ANDROID_SDK_ROOT
-
Variable Value :
D:\src\sdk
-
-
Edit the "PATH" variable in the User enviroment variable
-
D:\src\flutter\bin;
-
%ANDROID_SDK_ROOT%\tools;
-
%ANDROID_SDK_ROOT%\platform-tools;
-
-
Run
flutter config --android-sdk [sdk location]
in the terminal -
Run
flutter doctor --android-licenses
in the terminal
Launch an AVD in the emulator
-
D:\__GitHub\netninja_flutter_app
>flutter doctor --android-licenses
- All SDK package licenses accepted
-
D:\__GitHub\netninja_flutter_app
>flutter emulator
- Pixel_2_API_28
-
D:\__GitHub\netninja_flutter_app
>flutter emulator --launch Pixel_2_API_28
- When clicked, "Nothing here" shows up.
Flutter Doctor
-
D:\__GitHub\netninja_flutter_app
>flutter doctor -v
-
[✓] Flutter (Channel stable, 1.22.2, on Microsoft Windows [Version 6.1.7601], locale en-US)
-
[✓] Flutter version 1.22.2 at D:\src\flutter
-
[✓] Framework revision 84f3d28555 (9 days ago), 2020-10-15 16:26:19 -0700
-
[✓] Engine revision b8752bbfff
-
[✓] Dart version 2.10.2
-
-
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.)
-
[✓] Android SDK at D:\src\sdk
-
[✓] Platform android-30, build-tools 30.0.2
-
[✓] ANDROID_SDK_ROOT = D:\src\sdk
-
[✓] Java binary at: D:_programs\Android\jre\bin\java
-
[✓] Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
-
[✓] All Android licenses accepted
-
-
[✓] Android Studio (version 4.1.0)
-
[!] Flutter plugin not installed; this adds Flutter specific functionality
-
[!] Dart plugin not installed; this adds Dart specific functionality
-
[✓] Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
-
-
=> I installed "Dart" & "Flutter" plugins. So, I don't know why the error message says that those plugins are not installed. (This answer says just ignore the error message. So, I did so.)
QUESTION! How could I connect a device to this project?