是否可以在 Mac 上以 root 身份从 NetBeans 运行 Android 模拟器
我已在 Mac OS X (Leopard) 系统上安装了 NetBeans 6.8,并使用该平台的 Kenai 插件来创建 Android 应用程序。问题是我无法从以普通用户身份登录 Mac 的 NetBeans 运行 Android 模拟器。当以 root 身份登录时,我可以从命令行和 Eclipse 环境运行模拟器。当我尝试以 root 身份运行 NetBeans 时,它显示一条消息,指示无法加载 Android 插件的许多组件,因为 root 用户以某种方式链接到 Java 1.5,而该插件需要 Java 1.6。
据我所知,这个问题有 3 个解决方案:
- 将 root 用户环境链接到 Java 1.6 并使用 NetBeans 作为 root。
- 在运行模拟器之前强制 NetBeans 为 root。
- 坚持使用 Eclipse 进行 Android 开发。
如果有人知道如何执行 1 或 2,我将不胜感激您的建议。提前致谢。
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:
- Make the root user environment link to Java 1.6 and use NetBeans as root.
- Coerce NetBeans to su to root before running the Emulator.
- 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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
事实证明有一个简单的解决方法。首先以 root 身份使用目标设备运行模拟器,等待模拟设备的主屏幕出现,然后在 NetBeans 调试器中运行应用程序。 NetBeans 将连接到正在运行的模拟器,您可以从那里单步执行调试器中的代码。
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.