简体   繁体   English

Android模拟器不适用于Android版Mono

[英]Android Emulator does not work with Mono for Android

I am trying to write an application with Mono for Android. 我正在尝试使用Mono for Android编写应用程序。 In an attempt to do this, I'm using the default template in monodevelop. 为了做到这一点,我在monodevelop中使用了默认模板。 I can successfully compile and run the application. 我可以成功编译并运行该应用程序。 When I run the application, it looks similar to the one shown here: http://docs.xamarin.com/android/getting_started/hello_world 当我运行该应用程序时,它看起来此处显示的类似http : //docs.xamarin.com/android/getting_started/hello_world

There are two oddities in my version though: 我的版本中有两个奇怪之处:

  1. The button is red 按钮是红色的
  2. I can't seem to actually click the button. 我似乎无法实际单击该按钮。 When I use my computers mouse, it acts like it won't click the button. 当我使用计算机鼠标时,它的行为就像不会单击该按钮。 This is not limited to the application either. 这也不限于该应用程序。 If I try to click the home or search button in the emulator itself, I noticed that nothing happens either. 如果我尝试单击模拟器本身中的“主页”或“搜索”按钮,则会发现也没有任何反应。 Its like the emulator is not responding to my mouse. 就像模拟器没有响应我的鼠标一样。

As someone new to working with Android, can someone please tell me what I'm doing wrong? 作为刚接触Android的人,有人可以告诉我我做错了什么吗? I'm using MAC OS X with Lion installed. 我正在使用安装了Lion的MAC OSX。 I'm assuming that I have the SDK and Java SDK installed properly considering the app compiles and when I press "play" I can load the app in the emulator. 考虑到应用程序的编译情况,我假设我已正确安装了SDK和Java SDK,当我按“播放”时,可以将应用程序加载到模拟器中。 I just can't figure out why I can't actually click the button. 我只是想不出为什么我不能真正单击按钮。 So bizarre. 好奇怪

Any ideas? 有任何想法吗?

The title of this question is pretty misleading, since you're saying that the emulator is not very responsive even outside the Mono for Android application. 这个问题的标题很容易引起误解,因为您是说即使在Mono for Android应用程序之外,仿真器也没有很好的响应能力。 The problem here is with the emulator itself. 这里的问题是模拟器本身。 The one thing I would recommend trying with respect to Mono for Android is to try starting the application without debugging, as debugging will add extra overhead to running the app. 对于Android Mono,我建议尝试的一件事是尝试在不调试的情况下启动应用程序,因为调试会增加运行该应用程序的额外开销。

The Android emulator is notoriously slow, since it is fully emulating the ARM instruction set in software. 众所周知,Android仿真器速度很慢,因为它可以完全仿真软件中的ARM指令集。 That said, there are certain things you can do in order to squeeze some more speed out of it. 就是说,您可以做某些事情以提高速度。 One thing that I've seen make a big difference is to decrease the screen size of the emulator image. 我看到的一件大事是减小模拟器图像的屏幕尺寸。 Setting this to a small screen size (such as QVGA) can make a big difference. 将其设置为较小的屏幕尺寸(例如QVGA)会产生很大的不同。 You can manage these settings through Android's AVD Manager . 您可以通过Android的AVD Manager管理这些设置。

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

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