Flutter: no connected devices

社会主义新天地 提交于 2019-12-11 15:26:34

问题


I'm developing flutter project and I'm a newbie to flutter, My Avd manager shows only virtual device except real, whereas my another android project shows my real device and my Android WIFI ADB Here is Image is also showing a connected device, but flutter device selection showing nothing, What should I do? I'm following these steps but nothing is happening. I'm opening Emulator from AVD manager but whenever I run the project it does not show any device, Here is another image.

When I choose MainActivity to run than Android Studio shows device but it shows error like

Cannot start compilation: the output path is not specified for module "flutter_app1_android". Specify the output path in Configure Project.

I solved the problem then another problem occur

Unable to determine application id: com.android.tools.idea.run.ApkProvisionException: ERROR: APK path is not specified for module "flutter_app2_android" Client not ready yet.

I searched it for this problem but unable to set path because of Project Structure Does not show Module tool, It is showing only SDK Location and project, Here is the image


回答1:


Yes, I found the solution, It was showing no device because of my flutter SDK was not installed properly. I uninstalled the Flutter Sdk. And follow other processes to install the Flutter

1) Go to the Git Bash and run the Command

git clone -b beta https://github.com/flutter/flutter.git

it will download SDK at default place.

2) Now run the Command

flutter doctor

whenever you run the command it will show some error it may be SDK location not found and device not found.

set The Home Variable,

1) Go to Control Panel

2) Go to User Account

3)Change My Environment Variable (If your SDK is somewhere else then set Location like)

and restart your system to make changes and again run the command

flutter doctor

your project will show device and emulator which you are using.



来源:https://stackoverflow.com/questions/49082240/flutter-no-connected-devices

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!