when i start to emulate to my android phone and active developer mode and USB debugging
ii got these messages and i tried some things but it didn't workenter image description here
enter image description here
enter image description here
enter image description here
Based on the images you posted and the error shown you have not accepted Android SDK Licenses (As per your image)
Run flutter doctor --android-licenses in Terminal
You will be prompted to accept the licenses in the terminal.
Edit: It looks like as well, you do not have the CMD Line tools installed.
Please also run c:\Users\USERNAME\AppData\Local\Android\Sdk --install "cmdline-tools;latest" Make sure to replace USERNAME with your name.
If you have trouble installing cmdline tools from Terminal refer to this post: cmdline-tools missing
After you have accepted the licenses and installed cmdline tools try running it again. Happy Coding
Follow these steps for installing command line tools-
Open command like and enter - <path to android sdkmanager> --install "cmdline-tools;latest"
example,
~/Library/Android/sdk/tools/bin/sdkmanager --install
"cmdline-tools;latest"
OR
Install Android SDK Command-line Tools in Android Studio:
Preferences → Appearance & Behavior → System Settings → Android SDK → SDK Tools → Android SDK Command-line Tools (latest)
Follow these steps for android licenses -
Run this on command line - flutter doctor --android-licenses
Follow these steps for installing Visual Studio -
Just click on the link to download the setup, while the installation process you'll also have to install Desktop development with C++ workload. Don't worry you'll just see an option while installation process right away.
Related
for some reason, I don't want to install android studio(one of them is I don't have enough space for now) but instead, I want to work with vscode and nox(or genymotion). and my question is: Is it possible to connect vscode and an (android and ios) emulator to see the result? in other words, I want to connect the nox as an emulator to vscode and see the result inside of it.
Android studio take too much space and even my computer also become hot when open Android studio. But what I did I installed Android studio and Android emulator but I don't use Android studio rather I use VScode.
So as far as I know you need Android studio to install emulator then you can use VScode with it.
Finally, I found out how I can connect Genymotion to the VS Code(without Installing Android Studio).in total SDK manager wasn't installed on my laptop, so at first, I installed it. and then
Platform Tools (ADB & Fastboot)
Install Platform
Add System Image
Install Build Tools
but wait I just name the steps I've done. you can follow this article on this link to get more details.
and finally, instead of installing an emulator, I used Genymotion with Flutter in VS Code, which you can follow in this article to get more information. Click here
when i run flutter doctor shows this
message
I installed flutter and android studio in d drive. Downloaded all tools that needed.
android studio sdk tool
android studio sdk
Also added the variable in both system and user.
user
user
system
system
I cannot understand why flutter doctor show that error.Can anyone help me?
Before you do this, make sure you have internet connection to install the command line tools.
Open android studio sdk manager
At the SDK managers tabs, selects SDK Tools
From the list of tools shown, you'll see Android SDK Command-line tools.Select it and click on apply and ok.
Command-line tools will be installed and you are good to go.
Good Morning,
I am having a problem testing my Flutter applications for lack of memory. My computer only has 4GB of RAM and I can't open the emulator for lack of memory, can anyone help me how can I test the app right on my mobile phone?
You may need to configure Android toolchain (Step 6 to 12).
Install VSCode.
Install VSCode plugins flutter and dart.
Close VSCode.
Download Flutter SDK.
Unzip and Update environment path variable with "...\FlutterSDK\bin".
Download sdk-tools.
Create an folder anywhere with name "AndroidSDK" (or any other name)
Extract downloaded sdk-tools to AndroidSDK"
Open command prompt at "...\AndroidSDK\tools\bin"
Install platform-tools using the following command
sdkmanager platform-tools
Install corresponding platform and build-tools for your mobile device.
Example: If your device is Android 9 (Which is Android Pie and API level is 28), then commands are
sdkmanager platforms;android-28 (Use sdkmanager --list to see all packages available).
sdkmanager build-tools;28.0.3 (Use sdkmanager --list to see all packages available).
Update Environtment path variable with "...\AndroidSDK\platform-tools"
Now Open New Command prompt
Run Flutter doctor -v to check for any issues (You may have to accept android-licences).
flutter doctor --android-licenses
Now Open VSCode
Create Flutter project (Ctrl+Shift+p then type "Flutter: New Project")
Note*: Internet connection is required (or)
Open Existing Flutter Project folder
Connect your android device (Debugging mode should be enabled in the developer options)
You can see connected device in VSCode at bottom-right corner
Press F5 to run or use "Flutter run" command
If you have android studio installed then:
Go to C:\Users<User>\AppData\Local\Android\Sdk
Copy folders: platform, platform-tools
Past folder into flutter SDK folder.
connect your device to computer and it will automatically detected.
It worked for me.
i am trying to run flutter app in visual studio code by pressing F5,
connecting a real device, but unable to run the app
my android sdk path--
C:\src\flutter\flutter
my flutter app path--
D:\flutter\flut\flut
error message--
flutter doctor -v ----
Try the followings.
run the flutter doctor --android-licenses and accept licenses.
(it happened to me too)
Install the flutter & DART plugin in Android Studio.
Then run the project again
Add the flutter bin dir to your path
First you have to accept the licenses for Android SDK. Write the following commands in your terminal.
flutter doctor --android-licenses
After adding above command you have to accept all the list of licenses one by one to get ahead.
In your case, you have not installed dart and flutter plugin. So, close your project and go to "Welcome Screen" of IDE where you will see a "Configure" button. click on it and select "Plugins".
Now, search for Flutter and Dart and install both of them. After installing both restart your IDE to apply new changes.
Now, you're Done with the setup. Now, you can run your project in real device or emulator by configuring them.
you need to accept the android licence, to do so,
run the command
flutter doctor --android-licenses
in your terminal, and press yes when prompted in the terminal.
The flutter and dart plugins are also not installed on your Android Studio, to include these, add dart and flutter plugins and restart your Android Studio.
And finally run the command flutter doctor in your terminal and check every thing is installed correctly.
Had that issue. Had to downgrade Java from 11 to 8. After that I have been able to accept the all the licenses. But in order to run the app - had to upgrade back Java 11. And also has to be sure that that JAVA_HOME path is JDK, but not JRE. But that that is the next thing.
I have a Nativescript application that I'm developing using VS Code and have no issues when I try to run it using the Nativescript launch configurations from the Nativescript extension, when I'm using a real device connected with USB or when I use one of the android-sdk emulators.
Now I need to run Hyper-V on the machine too and those emulators cannot run when hypervisor is on. So I downloaded and installed Visual Studio Android Emulator which runs fine when I launch it manually.
Problem is that the nativescript project doesn't recognize this device either with tns device or adb devices commands and if I try to launch the application from VS Code it tries to launch one of the other emulators, which obviously fails due to the hypervisor/Intel Haax incompatibility.
Did any of you had this problem before and have any solutions you can share?
Thanks.
Microsoft MSDN say :
If the emulator is running, but it does not appear to be connected to ADB or it does not appear in Android tools that make use of ADB (for example, Android Studio or Eclipse), you may need to adjust where the emulator looks for ADB.
The emulator uses a registry key to identify the base location of your Android SDK, and looks for the \platform-tools\adb.exe file under that directory.
Here We Go!! Step By Step ;)
Copy Your ANDROID SDK PATH for me it look like this :
To modify the Android SDK path used by the emulator:
Open Registry Editor by selecting Run from the Start buttons context menu, typing regedit in the dialog box, and choosing OK.
Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Android SDK Tools in the folder tree on the left.
Note : if Android SDK Tools folder doesn't exist, Create it under WOW6432Node, And open it, And Create a String Value name it Path:)
Modify the Path registry variable to match the path to your Android SDK.
Restart the emulator and you should now be able to see the emulator connected to ADB and associated Android tools.
Now! Open Your Terminal (CMD), and Run ADB command
adb devices -l
YES YES !! The Visual Studio Emulator is running, and connected to ADB!
HERE WE GOO !!
Now We Want To Create A Demo App (for example FIRSTZAKI) ZAKI is my nickname :p
On Terminal (CMD) :
tns create FIRSTZAKI
Choose Android Platform
cd FIRSTZAKI\
tns platform add android
Check if VS EMULATOR is ready!
tns devices
YES YES ^^
Finally Step (RUN/BUILD) :
tns run android
WOW ... Great :)
AND .. Good Luck ♥ — ZAKI