The project is not a Gradle-based project. How do I open the project from the root directory?
Your project is not Gradle based because settings.gradle
and bulid.gradle
are not in the IDE project directory, they are in that blacked-out subfolder under .idea
and .gradle
in your picture.
You must close this project. Open that other folder as an Android Studio Project, regardless of where you got that project from.
For library projects in Github, it would look like this. Anyone can clone this as-is and open as a project.
For apps, replace sample
with app
, and remove library
Most importantly, buildscript
and allprojects
section should not be in /app/build.gradle
, only /build.gradle
Additionally, your Gradle build plugin is outdated
Android studio: this project is not gradle based project
Make sure you open the project from its root directory. i.e. the directory which contains the top level build.gradle
file.
The missing top level gradle file is what causes this error.
ANDROID STUDIO: this project is not a gradle-based project
Make sure you open the project from its root directory. i.e. the directory which contains the top level build.gradle
file.
The missing top level gradle file is what causes this error.
Creating a gradle based android project via command line
Use the -g
option when creating the project. For more details, try
android create project -h
Related Topics
Resource Linking Fails on Lstar
Difference Between Finish() and System.Exit(0)
Android/Java: Transition/Migration from Proguard to R8
How to Use a Timertask to Run a Thread
Yet Another Getview Called Multiple Times
How Do Task Managers Kill Apps
Access Files from Assets/Www Directory
Android - Making Sliding Drawer to Slide from Left-To-Right
Play an Audio Clip Onto an Ongoing Call
Android Unknown Command 'Crunch'
What Is the "Ignoring Innerclasses Attribute" Warning Output During Compilation
Error Java.Lang.Runtimeexception: Stub! in Android with Fitnesse Testing
App and Website Saved Password Is Not Sync
Android/Firebase - Error While Parsing Timestamp in Gcm Event - Null Timestamp
Android Youtubeplayer with Unauthorized Overlay on Top of Player