开发者

Is it possible to run the Android emulator as root from NetBeans on the Mac

开发者 https://www.devze.com 2022-12-19 04:33 出处:网络
I have installed NetBeans 6.8 on my Mac OS X (Leopard) system and use the Kenai plugin for this platform to create an Android开发者_运维知识库 application.The trouble is that I cannot run the Android

I have installed NetBeans 6.8 on my Mac OS X (Leopard) system and use the Kenai plugin for this platform to create an Android开发者_运维知识库 application. The trouble is that I cannot run the Android emulator from NetBeans logged in to the Mac as a normal user. I can run the emulator from the command line and the Eclipse environment when logged in as root. When I try to run NetBeans as root, it displays a message indicating many of components of the Android plugin cannot be loaded because the root user somehow links to Java 1.5 and the plugin needs Java 1.6.

There are 3 solutions to this problem as far as I can see:

  1. Make the root user environment link to Java 1.6 and use NetBeans as root.
  2. Coerce NetBeans to su to root before running the Emulator.
  3. Stick to using Eclipse for Android development.

If anyone knows how how to do 1 or 2 I would appreciate getting advice from you. Thanks in advance.


Turns out there is a simple workaround. First run the emulator with the target devices as root, wait for the main screen of the emulated device to appear then run the application in the NetBeans debugger. NetBeans will attach to the running emulator and from there you can step through the code in the debugger.

0

精彩评论

暂无评论...
验证码 换一张
取 消