简体   繁体   中英

No res folder. No activity_main.xml. No activity. No layout

I am just starting to use Android Studio.

I have followed the steps through in the Studio. I chose "Basic Activity". The app loads, but there's nothing but empty directories there and it has no activity folder or anything to edit the layout with.

I checked it in the Windows explorer, and it just looks the same as in Android studio.

I've read this , this , this , this , this , this , and other ones, and have probably spent over an hour trying to figure out how to do this.

I've also re-tried creating the project at least 5 times, but I've had no success.

Edit: Here's what the app folder looks like: 在此处输入图片说明

Edit: Someone told me I should just create a new activity. Being an absolute new person, I didn't know how to do that, so I looked at this post . However, the post tells me that I need to go into the "New" menu, but I don't see "Activity" in here like the post asserted it would be.

在此处输入图片说明

In the following menu click the arrow and select "Project" (is better):

在此处输入图片说明

Then go to "name of your project folder" > "app" > "src" > "main" > "res".

I have no idea if this was what was causing it, but first I uninstalled then re-installed Android studio, deleted the old project, and created a new one.

It still didn't work, BUT I just noticed a little error log button.

You see, I named my application com.con.pfq. It wasn't liking the "con" part - said it's an invalid file name.

Sooo... I recreated the app as com.connoriscool.pfqmmobile. It liked that more.

No idea what's happening here, but that's the solution.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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