无法使用 Eclipse 创建新的 Android 项目
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11492585/
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
Cannot create a new Android Project using Eclipse
提问by JetPro
I recently updated my sdk version from 18 to 20.
我最近将我的 sdk 版本从 18 更新到 20。
I tried to create a new Android Application Project. I filled up all the needed fields to create a new project but when I came to the last page of the creating a new Android Application Project, this appears:
我试图创建一个新的 Android 应用程序项目。我填写了创建新项目所需的所有字段,但是当我来到创建新 Android 应用程序项目的最后一页时,出现了:
" This templates depends on the Android support library, which is either not installed, or the template depends on a more recent version than the one you have installed.
" 此模板依赖于未安装的 Android 支持库,或者模板依赖于比您安装的版本更新的版本。
Required version: 8 Installed version: Not installed "
所需版本:8 已安装版本:未安装”
Then it also displays this link. http://developer.android.com/sdk/compatibility-library.html
然后它也显示这个链接。 http://developer.android.com/sdk/compatibility-library.html
It also has two buttons:
它还有两个按钮:
- Install/Upgrade
- Check again
- 安装/升级
- 再检查一遍
When I click the first button, it's not downloading, installing or upgrading any of my software. And this messages display to my Console:
当我单击第一个按钮时,它并没有下载、安装或升级我的任何软件。此消息显示在我的控制台上:
[2012-07-15 21:55:08 - SDK Manager] Fetching https://dl-ssl.google.com/android/repository/addons_list-2.xml
[2012-07-15 21:55:16 - SDK Manager] Fetched Add-ons List successfully
[2012-07-15 21:55:16 - SDK Manager] Fetching URL: https://dl-ssl.google.com/android/repository/repository-7.xml
[2012-07-15 21:55:37 - SDK Manager] Done loading packages.
[2012-07-15 21:55:37 - Android Compatibility JAR not found:] D:\Software\Eclipse\v4\android-support-v4.jar
The button two does not do anything at all.
按钮二根本不做任何事情。
I downloaded the compressed file 'android-sdk_r20-windows' and extracted it to my hard drive. I used it to download the following:
我下载了压缩文件“android-sdk_r20-windows”并将其解压缩到我的硬盘上。我用它来下载以下内容:
- Android SDK Tools
- Android SDK Platform-tools
- SDK Platform API8
- Google APIs 8
- Android SDK 工具
- Android SDK 平台工具
- SDK平台API8
- 谷歌 API 8
I don't understand what my problem is, my eclipse works properly when I still haven't updated it yet. Did I forget do download some required tools or something?
我不明白我的问题是什么,当我还没有更新它时,我的 Eclipse 工作正常。我是不是忘记下载一些必需的工具之类的了?
Please help me.
请帮我。
Add:My eclipse works fine when I imported my previous Android Applications (my app runs on my emulator), the only problem is that I can't create a new Android Application.
添加:当我导入以前的 Android 应用程序(我的应用程序在我的模拟器上运行)时,我的 Eclipse 工作正常,唯一的问题是我无法创建新的 Android 应用程序。
采纳答案by Michael Hampton
Open SDK Manager.exe
within the Android SDK r20 that you downloaded. In the list of software, scroll down to Extras at the bottom, and choose Android Support Library.
打开SDK Manager.exe
Android SDK的R20中,你下载。在软件列表中,向下滚动到底部的 Extras,然后选择 Android Support Library。
回答by bill davis
I struggled with this for about an hour today and it started working. I think the key was to uninstall and reinstall the support library, then restart eclipse.
我今天为此挣扎了大约一个小时,它开始工作了。我认为关键是卸载并重新安装支持库,然后重新启动eclipse。
Note: I had to restart eclipse twice, after uninstalling the support library from within the SDK manager. Manually deleting the folder form terminal did not work for me.
注意:从 SDK 管理器中卸载支持库后,我不得不重新启动 eclipse 两次。手动删除文件夹表单终端对我不起作用。
回答by ngocquynh_183
Step 1: Open Android SDK Manager. In the list of software, scroll down to Extras at the bottom >> and choose Android Support Library >> Delete Package >> Delete complete restart eclipse
第 1 步:打开 Android SDK 管理器。在软件列表中,向下滚动到底部的 Extras >> 并选择 Android Support Library >> Delete Package >> Delete complete restart eclipse
Step 2: Open Android SDK Manager. In the list of software, scroll down to Extras at the bottom >> and choose Android Support Library >> InstallPackage >> Installl complete restart eclipse >> Done
第 2 步:打开 Android SDK 管理器。在软件列表中,向下滚动到底部的 Extras >> 并选择 Android Support Library >> InstallPackage >> Installl complete restart eclipse >> Done
回答by Himanshu
回答by geeky
Following steps worked for me:
以下步骤对我有用:
- Goto Help > check for updates > Select Android Tools Development and install it
- Restart Eclipse
- Eclipse asked me to update Android SDK Tool. I clicked on ok
- Android SDK Manager opened and I selected the options to install and update.
- After finishing, I restarted eclipse and created new android project.
- 转到帮助 > 检查更新 > 选择 Android 工具开发并安装它
- 重启 Eclipse
- Eclipse 要求我更新 Android SDK 工具。我点击确定
- Android SDK 管理器打开,我选择了安装和更新选项。
- 完成后,我重新启动了 eclipse 并创建了新的 android 项目。
回答by user1374913
Delete the Android Support Library from Extras-Android support Library..Then install it again..later you will be able to create new projects
从 Extras-Android 支持库中删除 Android 支持库..然后重新安装..稍后您将能够创建新项目
回答by Gaurav
Workaround that worked for me: - Delete the support library from the SDK manager - Create a new project & install the support library by clicking on "Install / Upgrade"
对我有用的解决方法: - 从 SDK 管理器中删除支持库 - 创建一个新项目并通过单击“安装/升级”安装支持库
回答by Aiden Fry
In fact I think there is a bug with the Text icon creator. Every time i try this it does not create the project properly even after doing all the re-installs as suggested by the other posts.
事实上,我认为文本图标创建器存在一个错误。每次我尝试这样做时,即使按照其他帖子的建议进行了所有重新安装,它也无法正确创建项目。
回答by Magicode
I was having this problem on one machine, when logged on with an account with limited admin privileges. I had set up the proxy details in the SDK Manager options menu and set it to force http instead of https. The extras folder was coming up empty.
当使用具有有限管理员权限的帐户登录时,我在一台机器上遇到了这个问题。我已经在 SDK Manager 选项菜单中设置了代理详细信息,并将其设置为强制使用 http 而不是 https。extras 文件夹是空的。
In the log I had a message saying that it failed to download "https://dl-ssl.google.com/android/repository/addons_list-2.xml" as the file was not found. I then went to tools->manage addon sites
, then under user defined sites
I added the URL "https://dl-ssl.google.com/android/repository/addon.xml" (Different from the file mentioned in the log but it seemed to work). When I exited that dialog it updated the list and the extras folder was now populated with items including the Android Support Library.
在日志中,我有一条消息说它无法下载“https://dl-ssl.google.com/android/repository/addons_list-2.xml”,因为找不到文件。然后我去了tools->manage addon sites
,然后在user defined sites
我添加了 URL“https://dl-ssl.google.com/android/repository/addon.xml”(与日志中提到的文件不同,但它似乎有效)。当我退出该对话框时,它更新了列表,并且 extras 文件夹现在填充了包括 Android 支持库在内的项目。
回答by FaTi
i had some problem. So for resolve this problem I change folder tools (adt-bundle-windows-x86_64-20130911\sdk\tools) by http://dl-ssl.google.com/android/repository/tools_r22-windows.zip
我有一些问题。因此,为了解决这个问题,我通过http://dl-ssl.google.com/android/repository/tools_r22-windows.zip更改文件夹工具 (adt-bundle-windows-x86_64-20130911\sdk\tools)