简体   繁体   中英

Why Project's build.gradle is not showing?

在此处输入图片说明

在此处输入图片说明

Why is Project's build.gradle not showing up in Android mode?

Just like the picture below, the .gradle file in the project root directory can also be displayed in Android mode. enter image description here

You need to change it at here. You choose to display the project instead the Android.

在此处输入图片说明

You changed the display mode. Notice that the first image, you configured to "Project Mode" and the second one is in "Android Mode". It's on the upper-left corner of the "project" tree view.

在此处输入图片说明

Your using project structure better to use android structure view

secound thing is if you want to use project structure then project->build.gradle is your project level gradle file for Ex. AndroidWeather/build.gradle

This can happen when the caches get messed up. Try this:

  • Close the project in Android Studio
  • Delete the .idea folder in the project folder:
  • In Android Studio, File / New / Import Project... and select the folder of the project

Note, to delete the folder:

cd /path/to/project
rm -rf .idea

Now you should see the project-level build.gradle in the Android scope.

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