是否可以在 Mac 上以 root 身份从 NetBeans 运行 Android 模拟器

发布于 2024-08-20 16:53:27 字数 482 浏览 6 评论 0原文

我已在 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 个解决方案:

  1. 将 root 用户环境链接到 Java 1.6 并使用 NetBeans 作为 root。
  2. 在运行模拟器之前强制 NetBeans 为 root。
  3. 坚持使用 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:

  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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

明月夜 2024-08-27 16:53:27

事实证明有一个简单的解决方法。首先以 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文