intellij IDEA - 创建Android应用程序失败

发布于 2024-11-05 18:56:19 字数 830 浏览 0 评论 0原文

当我尝试在 intellij idea 中创建 android 应用程序时,我得到以下

The project wasn't generated by 'android' tool

: can't find sdkmanager.jar
/Users/timon/development/android-sdk-mac_x86/tools/android: line 30: dirname: command not found
/Users/timon/development/android-sdk-mac_x86/tools/android: line 33: basename: command not found
/Users/timon/development/android-sdk-mac_x86/tools/android: line 40: dirname: command not found
/Users/timon/development/android-sdk-mac_x86/tools/android: line 44: dirname: command not found
/Users/timon/development/android-sdk-mac_x86/tools/android: line 48: basename: command not found

显示窗口:

error

我尝试设置PATH 变量定位 android SDK 但它没有帮助。 Android SDK 已正确安装,我可以在 Eclipse 中创建并运行 Android 项目。我做错了什么?这似乎是一个很常见的错误。请帮忙!

When I'm trying to create android application in intellij idea I get the following

The project wasn't generated by 'android' tool

: can't find sdkmanager.jar
/Users/timon/development/android-sdk-mac_x86/tools/android: line 30: dirname: command not found
/Users/timon/development/android-sdk-mac_x86/tools/android: line 33: basename: command not found
/Users/timon/development/android-sdk-mac_x86/tools/android: line 40: dirname: command not found
/Users/timon/development/android-sdk-mac_x86/tools/android: line 44: dirname: command not found
/Users/timon/development/android-sdk-mac_x86/tools/android: line 48: basename: command not found

showing the window:

error

I tried to set up PATH variables locating android SDK but it doesn't help. Android SDK is installed correctly and I can create and run android projects in Eclipse. What am I doing wrong? It seems like very common error. Please help!

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

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

发布评论

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

评论(2

屌丝范 2024-11-12 18:56:19

这看起来像是路径问题。我不知道到底发生了什么,但您可能想尝试从命令行而不是通过 Finder 打开应用程序。这样它将继承您的 PATH - 当您从 Finder 启动时则不会。一般来说,即使我没有遇到问题,我也会确保从命令行运行 Intellij。

This looks like a path problem. I don't know exactly what's going on but you might want to try opening the app from the command line rather than through Finder. This way it will inherit your PATH - it doesn't when you launch from Finder. In general, even when I don't have problems, I make sure to run Intellij from the command line.

眼前雾蒙蒙 2024-11-12 18:56:19

我在 Mac 上使用 IntelliJ Idea 11 时遇到了同样的问题。
添加导出 PATH=/Users/myhomedir/Downloads/android-sdk-macosx:$PATH 并从命令行终端启动 idea 有所帮助。

I had the same problem with IntelliJ Idea 11 on mac.
Adding export PATH=/Users/myhomedir/Downloads/android-sdk-macosx:$PATH and starting idea from command line terminal helped.

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