Android studio 没有主要活动,没有新项目的布局 [英] Android studio no main activity, no layouts on a new project

查看:27
本文介绍了Android studio 没有主要活动,没有新项目的布局的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装了新的 Android Studio.我创建了新项目并要求向导创建主要活动.但是没有布局,没有主要活动类,什么都没有.尝试创建新的 Java 类文件时出错.新的项目树如下所示:
没有 (main/java) 文件夹.
没有(res/layout)文件夹.
换句话说,项目没用.

I installed new Android Studio. I created new Project and asked the wizard to create main activity. But there were no layouts, no main activity class, no nothing. Error on trying to make new Java class files. The new project tree looks like this:
No (main/java) folder.
No (res/layout) folder.
Other words project is useless.

推荐答案

创建项目后,您需要转到文件"菜单,然后导入项目".然后浏览到您的项目所在的位置并将其导入.然后您将看到所有这些文件和文件夹.我也遇到了这个问题,他们似乎在较新版本的 Android Studio 中忽略了这一点(如果你问我,这很可悲).

After creating the project, you need to go to File menu and then Import Project. Then browse to the location of your project and import it. Then you will see all of these files and folders. I had this problem too, and it seems to be something that they overlooked in the newer versions of Android Studio (which is quite pathetic if you ask me).

这篇关于Android studio 没有主要活动,没有新项目的布局的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆