在 Eclipse 中创建一个新的 Android 项目
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11386448/
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
Creating a new Android project in Eclipse
提问by Razar Blade
In old version of Eclipseand Android SDK when I wanted develop an android app I used to open "New" and then "Android Project."
在旧版本的Eclipse和 Android SDK 中,当我想开发一个 android 应用程序时,我曾经打开“New”然后打开“Android Project”。
Now in the new version it changed to Android Application Project and this makes me confused. There are so many opened packages and folders. I would like to only create an android project, not android application project.
现在在新版本中它更改为 Android 应用程序项目,这让我感到困惑。有这么多打开的包和文件夹。我只想创建一个 android 项目,而不是 android 应用程序项目。
I am new and I would like it as simple as possible, something like this:
我是新手,我希望它尽可能简单,如下所示:
Not this (newer version of "New Android Project" menu:
不是这个(较新版本的“新 Android 项目”菜单:
回答by Chris Stratton
The new project wizard in ADT version 20 can indeed be a bit confusing. Suggestions:
ADT 20 版中的新项目向导确实有点令人困惑。建议:
In the first screen it is mostly the same other than a change to dropdown lists for the version selection.
If you don't want to see the second screen picking a launcher icon, uncheck "create custom launcher icon" on the first screen.
On the last screen, if you want to make a project that works on older versions without the compatibility libraries (ie, make an old style project) then uncheck "create activity".
If you do File - New - Project - Android you can get at the options for creating from a sample or existing code. If you pick an older target you can pick an older version of the samples.
在第一个屏幕中,除了更改版本选择的下拉列表之外,它几乎是相同的。
如果您不想看到选择启动器图标的第二个屏幕,请取消选中第一个屏幕上的“创建自定义启动器图标”。
在最后一个屏幕上,如果您想创建一个在没有兼容性库的情况下在旧版本上运行的项目(即,创建一个旧样式项目),请取消选中“创建活动”。
如果您执行 File - New - Project - Android,您可以获得从示例或现有代码创建的选项。如果您选择较旧的目标,则可以选择较旧版本的样本。
回答by HerbM
Ok, found a solution here:
好的,在这里找到了解决方案:
http://droiddudes.com/2012/07/12/unable-to-create-android-project-in-eclipse-with-adt-20/
http://droiddudes.com/2012/07/12/unable-to-create-android-project-in-eclipse-with-adt-20/
Delete Android Support Tools (version 9) from ADK.
从 ADK 中删除 Android 支持工具(版本 9)。
Run App wizard again -- it will complete that it requires Version 8 -- confirm you wish to install. Version 9 gets (re)installed. Dialog completes.
再次运行应用程序向导——它将完成它需要版本 8——确认您希望安装。版本 9 得到(重新)安装。对话完成。
Next time you run it there are no errors, and if you look in ADT manager it is in there (again.)
下次运行它时没有错误,如果您查看 ADT 管理器,它就在那里(再次)。
Update: Worked for "test" project then failed for my new real project which has SPACE in the name -- changed the PROJECT NAME (not the app name) to remove the space and the wizard completed correctly.
更新:为“测试”项目工作,然后我的新真实项目失败了,该项目的名称中有空格——更改了项目名称(不是应用程序名称)以删除空格并且向导正确完成。