无法在 Eclipse 中运行 android sdk 管理器
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/14618001/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Failed to run android sdk manager in Eclipse
提问by Mr.Cosmic
I'm trying to code an app for android and I ran into a problem with the sdk manager. When I try to run it in eclipse, it says "Failed to run android sdk manager. Check the Android Console View for Details."Then in the console it says:
我正在尝试为 android 编写应用程序,但遇到了 sdk 管理器的问题。当我尝试在 Eclipse 中运行它时,它显示“无法运行 android sdk 管理器。检查 Android 控制台视图以获取详细信息。” 然后在控制台它说:
[2013-01-30 21:27:45 - SDK Manager] Missing %s file in Android SDK.
[2013-01-30 21:27:45 - SDK Manager] android.bat
[2013-01-30 21:27:45 - SDK Manager] Android SDK 中缺少 %s 文件。
[2013-01-30 21:27:45 - SDK 管理器] android.bat
I reinstalled eclipse, the sdk and tried everything any other posts about the same problem but nothing works.
我重新安装了 eclipse、sdk 并尝试了所有其他关于同一问题的帖子,但没有任何效果。
回答by Venkatesh S
I was able to restore the missing items in File | New... quite easily by performing the following steps:
我能够恢复文件中丢失的项目 | 新...通过执行以下步骤很容易:
Switch to the Java perspective, either via the perspective switcher toolbar at the top right of the main Eclipse window, or via the Window | Open Perspective menu item.
Reset the perspective by either right-clicking on the Java perspective icon in the perspective switcher toolbar, or by clicking Window | Reset Perspective...
通过 Eclipse 主窗口右上角的透视切换器工具栏,或通过 Window | 切换到 Java 透视图。打开透视菜单项。
通过右键单击透视切换器工具栏中的 Java 透视图标或单击窗口 | 重置透视。重置视角...
As to why they weren't there in the first place, the most likely cause would be that the ADT contributes various things to the Java perspective, and these changes don't take effect until the perspective is reset after installing the ADT. As an Eclipse plug-in developer I learned it the hard way, that changes to perspectives don't get picked up unless you explicitly reset them.
至于为什么它们一开始就不存在,最可能的原因是 ADT 为 Java 透视图贡献了各种东西,并且这些更改在安装 ADT 后重置透视图之前不会生效。作为一名 Eclipse 插件开发人员,我通过艰难的方式了解到它的变化,除非您明确重置它们,否则不会发现对透视图的更改。
回答by SadieYu
Maybe you can try: chmod +x <ADTFolder>/sdk/tools/android
也许你可以试试: chmod +x <ADTFolder>/sdk/tools/android
回答by false9striker
Unzip your sdk zip somewhere, copy entire contents of tools directory, replace it with your actual sdk tools folder contents.
将您的 sdk zip 解压缩到某处,复制工具目录的全部内容,将其替换为您实际的 sdk 工具文件夹内容。
Restart eclipse if needed.
如果需要,重新启动 eclipse。
回答by JoxTraex
Ensure that your SDK has the android.bat file. By looking in the directory the SDK is in.
确保您的 SDK 具有 android.bat 文件。通过查看 SDK 所在的目录。