简体   繁体   English

创建新的android项目时,ADT不生成源文件

[英]ADT does not product source files when I create a new android project

So when I create my project using Android ADT (v22.3.0-887826) I target android 4.3 and have everything set to default. 因此,当我使用Android ADT(v22.3.0-887826)创建项目时,我的目标是android 4.3,并将所有内容均设置为默认值。 The src folder is completely empty. src文件夹完全为空。 From my understanding from the lynda tutorial I am following, it should generate a general MainActivity.java. 根据我对lynda教程的了解,它应该生成一个常规的MainActivity.java。 I triple checked and made sure when I was creating the project, that Create Activity was checked. 我进行了三重检查,并确保在创建项目时已选中“创建活动”。

I have also tried to create a new Activity (New -> Other -> Android -> Android Activity) and it generates nothing. 我也尝试过创建一个新的Activity(新建->其他-> Android-> Android Activity),它什么也不会产生。

You need to update the adt basically I followed this steps: How can I update my ADT in Eclipse? 您基本上需要按照以下步骤更新adt: 如何在Eclipse中更新ADT? and after that when you create a new project you will see a new MainActivity.java and the layout automatically created also added this activity in the manifest. 之后,当您创建一个新项目时,您将看到一个新的MainActivity.java,并且自动创建的布局还将此活动添加到了清单中。
First step: go to Help and click on Install New Software 第一步:转到“帮助”,然后单击“安装新软件”

第1部分

Second step: Click on add button, Name: add a name, Location: add this url https://dl-ssl.google.com/android/eclipse/ and click ok 第二步:单击添加按钮,名称:添加名称,位置:添加此URL https://dl-ssl.google.com/android/eclipse/ ,然后单击确定 第2部分

Third step:select both options, click on next, wait until instalation is complete. 第三步:选择两个选项,单击下一步,直到安装完成。
after that restart the adt and create a new project. 之后,重新启动adt并创建一个新项目。 在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM