简体   繁体   中英

Android Studio - Android Project View is Missing

在此处输入图片说明

I've found some webpage but it does not guide me back to normal android project view. http://developer.android.com/sdk/installing/studio-androidview.html

I did File => Other Settings => Default Project Structure => Default Settings => OK It make even worse, import library become not function-able.

I also had this problem (creating new project also looked similar to IntelliJ IDEA), got it fixed when I enabled some Android-related plugins.

Go to Preferences ( Settings on Windows and Linux) > Plugins and enable Android Support , at a minimum.

Now you will have "Android" option in the Project View .

Try:

View -> Tool Windows -> Project OR the shortcut is alt+1 .

If that's not working try:

Window -> Restore Default Layout OR the shortcut is shift+F12 .

Also, check that Studio is up to date:

Help -> Check for update...

android studio 左下角的方块可让您展开屏幕或使用侧边菜单填充屏幕。

The square at the bottom left corner of android studio lets you spread the screen or it populates it with side menus.

For me, it happened when I used Kotlin KTS for Gradle files, but created a java library module for this project. After trying to reimport project I got an error:

New Gradle Sync is not supported due to containing buildSrc module


Solution :
Migrate added module to kts
Remove created by Wizard settings.gradle , if you already use settings.gradle.kts
Reimport project
File -> Close project
Android Studio : import project
Show it your current project location

Just had the problem happen to me again. I got the problem solved, but unfortunately I can't confirm the solution, now that it's fix; but I have strong suspicions on what was the cause.

In my case, the problem occurred as a result of reorganizing my project directory. My projects are stored in given directory lets call it "Projects". I renamed that fold to "ProjectsBackup" and created a new "Projects" directory. I then moved selected projects now contained in the "ProjectBackup" directory to the new "Projects" directory. After moving the first project, I used Android Studio to open that project. That's when the problem occurred. I got a message that it couldn't find the gradle-wrapper and offered me the choice to create it. The gradle-wrapper is stored in a directory call "gradle" and its stored in the "Projects" directory. I had not copied that directory over from the "ProjectsBackup" to the new "Projects" directory. At the time, I thought nothing about that since, a new one was created. After trying all the various suggestion in this problem discussion, android studio offered a notification from me to update my "android gradle" plugin. I did the update and after that the "android" view was now available for me to select. The android gradle update fixed the problem.

I unfortunately, can't tell you what changed as a result of the update, nor can I tell you how you can force Android Studio to update or reinstall the android gradle plugin. All I can tell you is that I got lucky that android studio gave me that notification to update the android gradle plugin. Things like "file/project structure" and changing the Android Gradle Plugin Version, didn't fix the problem. What I did notice, was that when I first looked at that, the drop-down list of android gradle versions was an empty list. I manually put one in "3.6.3", but it didn't help. If you run into this problems I would suggest you look at the dates of the two file in the "wrapper" directory and compare those to projects you may have that are working correctly with the android view. I wish I would have checked the date of the wrapper jar file, when it wasn't working. That's what I think might have been wrong (ie I got a wrapper.jar file that was incompatible with my version of android studio - unfortunately I can't prove that)

上述解决方案都不适合我,所以我通过从我的项目中删除.gradle.idea文件夹来解决这个问题。

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