MonoDevelop 找不到 AVD 或者没有注意到它正在运行
我是 Mono 和 Android 新手。我已经寻找过这个问题,我发现的最接近的一个问题是关于 Java bug 的,并说要“重新安装”SDK,但我确实没有成功。
我注意到 Android 虚拟设备管理器在某个文件夹中有我所有设备的列表,但尝试在另一个文件夹中启动该设备。
您可以在这里看到这两个位置(在我的机器中):
如果我将 avd 文件夹复制到尝试启动模拟器的位置,它启动了,但是 MonoDevelop 没有被注意到。模拟器在“选择设备”弹出窗口中永远不可用,并且“确定”按钮永远不可用。我查看过是否可以找到一些地方来配置 AVD 的正确路径,或者通过某种方式告诉 MonoDevelop 模拟器正在运行,但没有成功。
有人可以帮助我吗?
提前致谢。
Im new in Mono and Android. I've looked for this problem and the most near I found talks about a Java bug and says to "reinstall" the SDK, witch I did resulting no success.
What I notice is that Android Virtual Device Manager has a list of all my devices at some folder, but try to initiate the device in another folder.
You can see those two locations (in my machine) here:
If I copy the avd folder to the location where it try to start the emulator, it starts but MonoDevelop dont get noticed. The emulator never is available in the "Select device" popup window and the "Ok" button is never available. I've looked if I can find some place to configurate the correct path to the AVD or some way to tell MonoDevelop that the emulator is ruuning but with no success.
Someone can help me?
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
。我得到它。
经过三天的查找,我在 Google 论坛中发现了问题:Windows 7 x64 上的 AndroidSDK 存在错误。解决方案是:您需要创建一个“环境变量”来告诉 AVD Manager(以及所有 AndroidSDK)您的 SDK 安装的“根”文件夹在哪里。疯了,一个?
那么,要做到这一点(如果您还不知道),请执行以下操作:
之后:
单击“高级系统设置”
在“高级”选项卡中,单击“环境变量...”
单击“新建...”按钮
插入“ANDROID_SDK_HOME”作为“变量名称”并文件夹您的 AndroidSDK 所在/安装的位置。就我而言,它是“D:\ MY_COMPANY \ ANDROID \ MONO_INSTALL \ ANDROID_SDK \ android-sdk”,其中“android-sdk”是我的SDK安装的根文件夹。当然,插入所有这些值时不带“引号”。
根据需要多次单击“确定”按钮以关闭所有窗口。
重新启动 AVD 管理器和 MonoTouch。
现在一切都应该正常了。但是......仍然有一个问题:当MonoDevelop运行应用程序时,在“选择设备”窗口上它看不到任何要启动的AVD。我正在从 AVDManager 启动 AVD 模拟器并等待它完全加载。当它完全启动时,我点击 MonoDevelop“选择设备”上的“刷新”按钮,然后等待模拟器出现在列表中。我无法选择它并点击“确定”按钮,但是在模拟器名称中“双击”就可以了。 MonoDevelop“理解”我想要使用模拟器并开始构建和部署应用程序。
我真的希望它能帮助那些开始学习 MonoDevelop 和 Android 的人。 Xamarin 开发人员应该更好地记录这种“错误”和“环境配置作弊”。当然,这些类型的“SDK bug”并不是 MonoDevelop 团队的错,但警告其潜在客户将会有所帮助,并给他们带来信心。
. I get it.
After spending 3 days looking around, I found the problem in a Google forum: there is a bug with the AndroidSDK on Windows 7 x64. The solution is: you need to create an "environment varialble" to tell AVD Manager (and all AndroidSDK) where is the "root" folder of your SDK installation. Crazy, an?
Well, to do that (if you don't know yet), do this:
After that:
Click on "Advanced system settings"
At "Advance" tab, click on "Environment Variables..."
Click on "New..." Button
Insert "ANDROID_SDK_HOME" as the "Variable Name" and the folder where your AndroidSDK is located/installed. In my case it is something "D:\MY_COMPANY\ANDROID\MONO_INSTALL\ANDROID_SDK\android-sdk" where "android-sdk" is the root folder of my SDK installation. Insert all these values without "quotes" of course.
Click OK button as many times you need to close all Windows.
Restart your AVD Manager and MonoTouch.
Everything should works fine now. But... still having a problem: When MonoDevelop runs the application, on "Select Device" window it can't see any AVD to Start. I'm starting the AVD emulator from AVDManager and wait it loads completely. When it is full started, I hit "refresh" button on MonoDevelop "Select Device" and wait the emulator appears on the list. I can't select that and hit "OK" button, but a "double click" in the name of the emulator do the trick. MonoDevelop "understand" that I want to use the emulator and start build and deploy the application.
I really hope it help guys who is startting learning MonoDevelop and Android. This kind of "buggy" and "environment configuration cheats" should be more well documented by the Xamarin developers. These kind of "SDK bugs" is not MonoDevelop team fault, of course, but warning its potential clients would help and brings confidence on their side.