Как подключить genymotion к visual studio
Я хотел бы использовать Visual Studio Code в качестве редактора для разработки Flutter, но я не знаю, как запустить эмулятор. Я установил код Visual Studio на Ubuntu 17.10 (Artful Aardvark).
Я выполнил первую половину инструкций, изложенных на странице Flutter: начало работы (Создание нового приложения). Затем во втором тайме у меня начались проблемы:
- Make sure a target device is selected in the lower, right-hand corner of VS Code
- Press the F5 button on the keyboard, or invoke Debug>Start Debugging
- Wait for the app to launch
- If everything works, after the app has been built, you should see your starter app on your device or simulator:
Проблема в том, что в правом нижнем углу находится «Нет устройств».
Как подключить устройство? Кажется, я нигде не могу найти инструкций.
@LeoCavalcante или android-x86
Charles Thomas Ingles
Charles Thomas Ingles
Будучи разработчиком веб-приложений, легко впасть в заблуждение, считая, что приложение без JavaScript не имеет права на жизнь. Нам становится удобно.
Если вы ищете пакет для быстрой интеграции календаря с выбором даты в ваше приложения, то библиотека Flatpickr отлично справится с этой задачей.
Клиент для URL-адресов, cURL, позволяет взаимодействовать с множеством различных серверов по множеству различных протоколов с синтаксисом URL.
У каждого из нас бывали случаи, когда нам нужно отцентрировать блочный элемент, но мы не знаем, как это сделать. Даже если мы реализуем какой-то.
Ответы 16
Вы можете подключить телефон Android через USB-кабель, и тогда устройство отобразится на нижней панели. (Обратите внимание, что должен быть установлен АБР. Нажмите здесь, чтобы узнать больше.)
Или вы можете полностью установить Android Studio и настроить эмулятор оттуда и запустить эмулятор. Затем Visual Studio Code распознает эмулятор и покажет его на нижней панели.
Привет @aawaz, я думаю, это то, что мне нужно сделать. Должен признать, что я видел инструкции по установке A / S, но я знал, что не хочу, чтобы это было моим основным редактором, поэтому я буквально перевернул страницу, предполагая, что можно пропустить эту часть. Но теперь похоже, что нужно было установить, если мне нужны биты эмулятора. Я попробую это сделать в эти выходные и расскажу, как все пройдет. Также большое спасибо за itp re телефона и usb кабеля!
Charles Thomas Ingles
Это заняло у меня больше времени, чем я думаю, но я переустановил A / S и после небольшого исследования кода ошибки / выхода запустил эмулятор. Это очень медленно, но, по крайней мере, обнаруживается. По одной ошибке за раз. Теперь посмотрим, распознает ли VS Code все это.
First, I am new to flutter and was trying to setup my environment.
So I had this problem where I was done with getting flutter working, VS Code was all set up but I kept on getting the “No Devices” message in the flutter bottom bar in the IDE, even though my Genymotion emulator was running.
If I had a physical device attached, I could run the flutter app without any problem. However, I did not want to use the physical device all the time.
I did the usual google search but almost all results were tied to Android Studio + Genymotion which was not what I was looking for. Those results that showed anything remotely close to VS Code did not explain how they got it working.
I am using Genymotion 3.0.2., VS Code (version 1.36.1)
In my case, as can be seen in the image below, even though my emulator is running on the right hand side of the image, my IDE is still showing “No Devices” in the bottom area. Also, running “flutter emulators” in the terminal does not show any running emulator.
Open up Genymotion and go to the ADB Setting section:
Notice how the default selection is “Use Genymotion Android Tools (default)”? With this selection, the emulator is not recognized.
Change it to “Use custom Android SDK tools”, set the SDK location to where your SDK is (in my case it’s at “C:\Program Files (x86)\Android\android-sdk”). Make sure the tick mark (“This folder is valid”) is displayed.
Close the settings box.
Now reload your “VS Code” IDE.
As you can see in the image below, the emulator is now available in the IDE. Strangely though, “flutter emulators” still does not recognize the emulator. This is because this emulator is seen as a physical device. I was able to observe this by running “flutter devices” and the emulator device is listed in there.
Run the application with “flutter run” in the terminal as usual and see the application running in the emulator.
I hope this article has helped you one way or another.
Suggestions and comments on another or better approach is very much welcome.
And yes send in some claps if you think it is deserved.
When we talk about emulators, we mainly expect to talk about “Android Studio”, personally I don’t like Android Studio because I find it heavy and slow under my computer which makes me less productive.
Funnily enough, I don’t think I’m the only one, if you agree, please feel free to applaud this article 😅️.
Android Studio consumes huge amount RAM
Thanks for contributing an answer to Stack Overflow! Please be sure to answer the question. Provide details and share…
for a long time I started looking for a better alternative and bingo I found “Genymotion” 💌️.
It is lighter and more powerful than Android Studio Emulators
Genymotion - Fast & Easy Android Emulator
The most powerful Android emulator for app developers & testers. Genymotion counts 5M+ users and is available for free…
You can download it for free on this link and follow all the installation process, sorry guys it’s not the purpose of this article show you how to install Genymotion Desktop :
“No Devices”
So I had this problem where I was done with getting flutter working, VS Code was all set up but I kept on getting the “No Devices” message in the flutter bottom bar in the IDE, even though my Genymotion emulator was running.
So far I haven’t plugged in any devices but I managed to install Genymotion but why this error?
The Cup of Solution
I installed with success “VS code” and also Genymotion, I installed “Google Pixel XL” as Device.
The first thing to do is to launch Genymotion to launch its emulator, you should have the same interface as me.
1 . Open up Genymotion and go to the ADB Setting section.
2. Change ADB to “Use custom Android SDK tools”, set the SDK location to where your SDK is (in my case it’s at “/home/jeanluckabulu/Android/Sdk”).
Make sure the tick mark (“This folder is valid”) is displayed.
3. Close the settings box.
4. Now reload your “VS Code” IDE.
Run the application with “flutter run” in the terminal as usual or “VS code” and see the application running in the emulator.
I have always been a fan of quick getting started guides. Here’s my attempt to help those looking to setup an android emulator to build their React native apps using create-native-react-app and Genymotion on Windows 10.
In this guide I’m assuming that people are starting from scratch. (fresh Windows install with no dependencies)
Node.js
Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine. Node.js uses an event-driven, non-blocking I/O…
Follow the installation instructions (keep clicking Next) until the Finish dialog appears.
Once done, open Command Prompt (click Start -> type cmd and hit Enter) and type one by one:
Troubleshoot your Node.js installation | New Relic Documentation
Troubleshooting tips if you have problems installing your New Relic Node.js agent.
As of the time of writing this guide. The support for npm@5 is buggy. I’m sure it’ll be fixed in the near future. But for now this is what you do:
Now that you’ve got Node.js up and running inside the command prompt next type:
Personally,
For company type I chose: Freelancers and,
for usage type I chose: Development
Once done you should be taken to the downloads page, if not head there yourself:
Account Login - Genymotion Android Emulator
Sign in to your Genymotion account with your login credentials (username or e-mail address) to manage your licenses…
Choose the option with VirtualBox (if you don’t have VirtualBox already installed on your Windows PC).
Once downloaded, open Genymotion and login with the credentials created in Step 3.
Now, you’ll be able to add a new Virtual Device (Ctrl+N).
Pick any from the list and click Next.
Once done you’ll see your devices listed under Virtual devices:
We’re almost there! Don’t press Start just yet, minimize the Genymotion window and right-click on This PC (My Computer) -> Select Properties.
Look for Advanced system settings on the left Panel and click it.
System Properties window should show up. Next click on Environment Variables on the bottom right.
In the Environment Variable window that shows up.
Under System variables bracket select Path and click Edit.
Next, in the edit environment variable window, click New -> add path C:\Program Files\Genymobile\Genymotion\tools -> click OK until all windows close.
Next, restore the previously minimized Genymotion window and click Start.
You should see an android emulator like this appear:
Next, open Command Prompt again and go to your projects directory and type:
Now, in the command prompt type:
Lastly, give permission to expo when you see this(or similar) screen in your Virtual Device.
Я хотел бы использовать VS Code в качестве редактора для разработки Flutter, но я не знаю, как запустить эмулятор. Я установил VS Code на Ubuntu 17.10.
Я следовал первой половине инструкций, описанных на странице Флаттер: начало работы (Создать новое приложение). Тогда я столкнулся с неприятностями во втором тайме:
Проблема в том, что в правом нижнем углу «Нет устройств».
Как мне подключить устройство? Я не могу найти инструкции нигде.
Из version 2.13.0 кода Dart эмуляторы можно запускать непосредственно из кода но эта функция опирается на поддержку инструментов Flutter, что означает, что она будет показывать эмуляторы только при использовании самого последнего пакета Flutter SDK . Главный канал Flutter уже имеет это изменение, но может пройти немного больше времени, чтобы пройти через dev и beta каналы.
Я протестировал эту функцию и очень хорошо работал на версии 0.5.6-pre.61 флаттера (мастер-канал)
Вам не нужна Android Studio для создания или запуска виртуального устройства. Просто используйте sdkmanager и avdmanager из инструментов Android SDK.
Используйте sdkmanager для загрузки системного образа Android для системы x86.
например . sdkmanager "system-images; android-21; по умолчанию; x86_64"
Затем создайте новое виртуальное устройство с помощью avdmanager.
например . avdmanager create avd --name AndroidDevice01 --package "system-images; android-21; по умолчанию; x86_64"
Затем запустите новое виртуальное устройство с помощью эмулятора. Если у вас его нет, просто установите его с помощью sdkmanager.
например . эмулятор -avd AndroidDevice01
Если вы перезапустите VSCode и загрузите ваш проект Flutter. Новое устройство должно отображаться в нижнем правом углу нижнего колонтитула.
Вы можете подключить телефон Android через USB-кабель, и тогда в нижней панели отобразится устройство. (Обратите внимание, что ADB должен быть установлен. Нажмите здесь для получения дополнительной информации)
Или вы можете полностью установить Android Studio и настроить эмулятор оттуда и запустить эмулятор. Затем VS Code запустит эмулятор и покажет внизу.
Во-первых, вам нужно установить Android Studio и Xcode, чтобы создать эмулятор телефона.
В VSCode вы можете использовать эмулятор Android IOS . Плагин для установки пути запуска эмулятора.
В качестве альтернативы, если вы включаете режим разработчика и (ADB) все еще требуется, вы можете использовать соединение с устройством.
Чтобы включить режим разработчика, перейдите в Настройки телефона> О телефоне> нажмите номер сборки 7 раз .
Как только вы включите его и подключите устройство, вы можете начать видеть устройство в VSCode
Были сделаны следующие шаги:
- установлено genymotion
- настроил устройство и запустил его
- в нижнем правом углу vscode устройство показывает
Вам не нужно создавать виртуальное устройство с помощью Android Studio. Вы можете использовать свое устройство Android, работающее на Android 8.0 или выше. Все, что вам нужно сделать, это активировать настройки разработчика, а затем включить USB-отладку в настройках разработчика. Ваше устройство будет отображаться в нижней правой части кода VS. Без включения отладки по USB устройство может не отображаться. введите описание изображения здесь
Установить "ANDROID_SDK_ROOT" в переменной среды, решить мою проблему.
Чтобы выбрать устройство, вы должны сначала запустить и Android Studio, и ваше виртуальное устройство. Затем код Visual Studio будет отображать это виртуальное устройство в качестве опции.
Затем введите Flutter:launch emulator или
Выполните эту команду в терминале с кодом VS flutter emulators , затем просмотрите результат, если вы установили какой-либо эмулятор, который он покажет вам, а затем для запуска одного из них используйте flutter emulators --launch your_emulator_id в моем случае flutter emulators --launch Nexus 6 API 28 но если вы не установили какой-либо эмулятор, вы можете установить его с помощью flutter emulators --create [--name xyz] , а затем запустите свой проект flutter run в корневом каталоге проекта.
Вы можете использовать плагин эмулятор Android iOS. и добавьте скрипт эмулятора Android Studio в свои настройки в коде Visual Studio:
Mac : emulator.emulatorPath": "~/Library/Android/sdk/tools/emulator
Windows : emulator.emulatorPath": "\\Sdk\\emulator\\emulator.exe
Linux : emulator.emulatorPath": "~/Documents/SDK/tools
Настройки кода вашей Visual Studio находятся здесь: Файл -> Настройки -> Настройки -> Пользовательские настройки -> Расширения -> Конфигурация эмулятора. Открыть командную палитру Cmd-Shift-P -> Type Emulator
VS Code должен знать, где Android SDK установлен в вашей системе. В Windows задайте для переменной среды «ANDROID_SDK_ROOT» корневую папку Android SDK.
Плюс: всегда проверяйте вкладки «OUTPUT» и «DEBUG CONSOLE» на наличие ошибок и информации.
Для тех, кто использует Mac, вы можете зайти в свой терминал и набрать
И эта команда откроет симулятор.
После этого просто перейдите к параметру «Отладка» и нажмите « Начать отладку ».
Если вы хотите проверить с помощью эмулятора Android,
Сначала я пошел в Android Studio и открыл виртуальное устройство с помощью AVD Manager. После этого вы увидите другие устройства в вашем коде Visual Studio
В правом нижнем углу вы увидите, что у вас есть 2 подключенных устройства. Теперь вы можете проверить с любым из этих устройств.
Читайте также: