eclipse 创建新的 Android 项目时 src 文件夹为空

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/22215499/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 21:33:40  来源:igfitidea点击:

src folder empty on creating new Android project

androideclipse

提问by Nitish

I am creating a new Android application in Eclipse. However on creating the project, srcfolder is empty. There is no package or Activity in srcfolder which I mentioned while creating the project. Also, there is no layout added in layoutfolder. The manifestfile has no information of Activity.

我正在 Eclipse 中创建一个新的 Android 应用程序。但是在创建项目时,src文件夹是空的。我在创建项目时提到的src文件夹中没有包或活动。此外,布局文件夹中没有添加布局。该清单文件没有活动的信息。

I also tried importing an existing project, the project gets imported but with empty folders.

我还尝试导入现有项目,该项目已导入但文件夹为空。

回答by surhidamatya

Try this

尝试这个

"Help" -> "Install new software" and install (this will update it) from this url: https://dl-ssl.google.com/android/eclipse/

“帮助”->“安装新软件”并从此网址安装(这将更新它) https: //dl-ssl.google.com/android/eclipse/

use https://
don't use http://

For any more detail please go through Adt doesn't create default hello world but command line does

有关更多详细信息,请查看Adt 不会创建默认的 hello world 但命令行会

回答by SK16

was trying to find answers from several hours...try this...Just changed configuration while creating new project.. click on create empty activity instead of blank activity...You will get hello world xml and java file in src

试图从几个小时内找到答案...试试这个...只是在创建新项目时更改了配置...单击创建空活动而不是空白活动...您将在 src 中获得 hello world xml 和 java 文件

回答by Ninja

I had the same problem:
The SRC folder was empty on creation of a new android project. I installed all required updates in the SDK manager. Additionally, check for new updates and use
https://dl-ssl.google.com/android/eclipse/as the update site (note that this is https://and not http://).
Restart eclipse and it should work.

我遇到了同样的问题:
创建新的 android 项目时,SRC 文件夹为空。我在 SDK 管理器中安装了所有必需的更新。此外,检查新的更新并
https://dl-ssl.google.com/android/eclipse/用作更新站点(请注意,这https://不是http://)。
重新启动 eclipse,它应该可以工作。

回答by BRap

I had the same 'error' and it appears to me if when creating the app I use in the 'application name' non ASCII characters!

我有同样的“错误”,在我看来,如果在创建应用程序时我在“应用程序名称”中使用非 ASCII 字符!

Example: ?????...

例子: ?????...

So do not use ????? in Application Name!

所以不要用???在应用程序名称中!

And yes, I know it's not good practice to use them in programming.

是的,我知道在编程中使用它们不是一个好习惯。