Eclipse Juno 不会创建 Android Activity
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11260619/
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
Eclipse Juno won't create Android Activity
提问by MikkoP
I downloaded Eclipse Juno Java EE edition
and installed ADT plugin
. I created a new Android Application
Project from Eclipse
and in the wizard I created an activity called TaskariActivity. After I pressed finish, it created the project but not the activity and the wizard didn't close. I pressed cancel. No activity or anything in the src folder. I created a new activity by right clicking on src, selecting new -> other -> Android -> activity
. I selected BlankActivity (as earlier when I was creating the project), selected the earlier created project in the Project combo box. I set the Activity
name as TaskariActivity, layout name as activity_main and title as TaskariActivity. Next I selected navigation type and I set it to Tabs + Swipe
(I thought this would make me tabs and everything I had to do would be just inserting the elements and the actions for them). I pressed next, nothing happened. Finish didn't also do anything. I pressed cancel and an activity wasn't created.
我下载Eclipse Juno Java EE edition
并安装了ADT plugin
. 我Android Application
从Eclipse
向导中创建了一个新项目,并在向导中创建了一个名为 TaskariActivity 的活动。在我按下完成后,它创建了项目而不是活动,并且向导没有关闭。我按取消。src 文件夹中没有活动或任何内容。我通过右键单击 src,选择new -> other -> Android -> activity
. 我选择了 BlankActivity(就像我之前创建项目时一样),在项目组合框中选择了较早创建的项目。我将Activity
名称设置为 TaskariActivity,将布局名称设置为 activity_main,将标题设置为 TaskariActivity。接下来我选择了导航类型并将其设置为Tabs + Swipe
(我认为这会让我成为标签,而我所要做的一切只是插入元素和它们的动作)。我按下了下一步,什么也没发生。完成也没有做任何事情。我按了取消,但没有创建活动。
So, how can I create an Android application
like in the earlier version of Eclipse
? It automatically created the activity and it was ready be run out of the box. Now it won't generate any files and the new activity wizard doesn't work. Help?
那么,我如何Android application
在早期版本中创建一个赞Eclipse
?它会自动创建活动,并准备好开箱即用。现在它不会生成任何文件并且新的活动向导不起作用。帮助?
采纳答案by Deepak Rajan
Just go with default launcher image (blue smiley) instead of customizing it and it should work ;)
只需使用默认启动器图像(蓝色笑脸)而不是自定义它,它应该可以工作;)
回答by john Peralta
Okay, this worked for me: "Help" -> "Install new software" and install (this will update it) from this url: https://dl-ssl.google.com/android/eclipse/I guess the Android website doesn't have an up-to-date version of ADT? Not sure where you're supposed to download the latest version from
好的,这对我有用:“帮助”->“安装新软件”并从此网址安装(这将更新它):https: //dl-ssl.google.com/android/eclipse/我猜是 Android 网站没有最新版本的 ADT?不知道你应该从哪里下载最新版本
回答by rajpara
Workaround that worked for me (If you have installed support library>8 and still get the error msg)
对我有用的解决方法(如果您安装了支持库>8 并且仍然收到错误消息)
- Delete the support library from the SDK manager
- Create a new project & install the support library by clicking on "Install / Upgrade"
- 从 SDK 管理器中删除支持库
- 通过单击“安装/升级”创建一个新项目并安装支持库
回答by Rick
I solved this same issue by updating the support library (through the Android SDK Manager, it is located at the end of the list under Extras > Android Support Library) from rev.8 to rev.9!
我通过将支持库(通过 Android SDK 管理器,它位于 Extras > Android Support Library 下的列表末尾)从 rev.8 更新到 rev.9 解决了同样的问题!
After updating, Eclipse is now able to create projects as expected.
更新后,Eclipse 现在可以按预期创建项目。
回答by blfuentes
I had the same problem and I could create the project changing the "minimum required SDK" to 3.0 Honeycomb.
我遇到了同样的问题,我可以创建项目,将“最低要求的 SDK”更改为 3.0 Honeycomb。
What is the versión you have selected?
您选择的版本是什么?