简体   繁体   English

Android Studio-模拟器不起作用,genymotion无法识别

[英]android studio - emulator doesn't work and genymotion doesn't get recognized

I'm building an app in Android Studio (beta) 0.8.9, though I can't seem to get emulators running. 我正在Android Studio(测试版)0.8.9中构建应用程序,尽管似乎无法运行模拟器。 I've made a Nexus 4 and 5 emulator through the options, but I can't seem to get them started. 我通过这些选项制作了Nexus 4和Nexus 5仿真器,但似乎无法启动它们。 It shows this in the Run App tab. 它在“运行应用程序”选项卡中显示。

Waiting for device.
"C:\Program Files (x86)\Android\android-studio\sdk\tools\emulator.exe" -avd smallEmulator -netspeed full -netdelay none

So either it's not starting up, or I'm just an impatient SOB. 因此,要么它还没有启动,要么我只是一个急躁的SOB。

I've also downloaded Genymotion and started up an emulator through that, but now Android Studio doesn't recognize the emulator anymore. 我还下载了Genymotion并通过它启动了一个模拟器,但是现在Android Studio不再能够识别该模拟器。 I try to run my app and check for any running devices, but it doesn't show up, despite the fact that it actually is running. 我尝试运行我的应用程序并检查是否有任何正在运行的设备,尽管它实际上正在运行,但它没有显示。

I've added the Genymotion plug-in, to no avail. 我添加了Genymotion插件,无济于事。 No idea what went wrong. 不知道出了什么问题。

I also have a One Plus One, which I'm not sure how I can debug on that. 我也有一个One Plus One,我不确定该如何调试。 They don't seem to have drivers for that and haven't immediatly found anything on Google so far. 他们似乎没有驱动程序,并且到目前为止尚未在Google上立即找到任何内容。

Any help would be much appreciated. 任何帮助将非常感激。

EDIT: I fixed my problem. 编辑:我解决了我的问题。 I used Genymotion to fix the problem. 我用Genymotion解决了这个问题。 The running emulator wasn't turning up, because the android SDK's weren't linked to one another. 正在运行的模拟器没有启动,因为android SDK并未相互链接。 Genymotion and Android Studio used different ones. Genymotion和Android Studio使用了不同的版本。 So I edited Genymotion's settings to use the same one of AS and now it works! 因此,我编辑了Genymotion的设置以使用相同的AS,现在可以使用了!

First of all, update android studio. 首先,更新android studio。 Check if the emulators run from the AVD manager outside Android Studio, I mean by starting it up manually from ur SDK installation folder (AVD Manager.exe) . 检查仿真器是否从Android Studio外部的AVD管理器运行,我的意思是从ur SDK安装文件夹(AVD Manager.exe)手动启动。 Check the path of ur emulator in .ini file in C:>Users>user-name > .android >avd. 在C:> Users> user-name> .android > avd中的.ini文件中检查ur仿真器的路径。 U can make a system variable for ur SDK folder "ANDROID_SDK_HOME" and place the .android folder's content there (the whole .android folder). 您可以为您的SDK文件夹“ ANDROID_SDK_HOME”创建一个系统变量,然后将.android文件夹的内容放置在其中(整个.android文件夹)。 Sometimes "resetting the adb" after u run emulator may work. 有时在您运行模拟器后“重置adb”可能会起作用。

There may be an easier fix than what was previously mentioned. 可能有比以前提到的更简单的修复方法。 Try opening Android Studio, go to File, Settings, plugins. 尝试打开Android Studio,转到“文件”,“设置”,“插件”。 Select the “Browse Repositories” button at the bottom of the page. 选择页面底部的“浏览存储库”按钮。 Scroll down the displayed page to find “Genymotion”; 向下滚动显示的页面以找到“ Genymotion”; select it and install it. 选择并安装。

When it has installed, restart Android Studio. 安装后,重新启动Android Studio。 Again, go to File, Settings, then go to Other Settings. 同样,转到“文件”,“设置”,然后转到“其他设置”。 Genymotion should show up as an option. Genymotion应该显示为一个选项。 There will be a field that asks for the path to the Genymotion folder. 将会有一个字段询问Genymotion文件夹的路径。

Mine was: C:\\Program Files\\Genymobile\\Genymotion . 我的是: C:\\Program Files\\Genymobile\\Genymotion At any rate, enter the path, click Apply or OK and Android Studio should recognize Genymotion (You may need to restart AS once again). 无论如何,输入路径,单击“应用”或“确定”,Android Studio应该会识别Genymotion(您可能需要再次重新启动AS)。 Now you should have a small red icon on Android Studios tool bar; 现在,Android Studios工具栏上应该有一个红色的小图标; when you hover over it a pop up that identifies it as “Genymotion Device Manager”. 当您将鼠标悬停在其上时,将弹出一个窗口,将其标识为“ Genymotion设备管理器”。 Click on it, select a device to load, click start and allow the virtual device to start completely. 单击它,选择要加载的设备,单击启动,然后允许虚拟设备完全启动。 Now run your Android Studio project; 现在运行您的Android Studio项目; the Android Studio “Device Chooser” will pop up. Android Studio“设备选择器”将弹出。 You should see the Genymotion device you'd started previously, select it and you're good. 您应该看到之前启动的Genymotion设备,选择它就可以了。

Hope this helps… 希望这可以帮助…

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM