Could not find method include() for arguments [:app] on root project Android Studio

Issue

I am trying to import an android project to Android studio,after importing and then clicking on the green run button :

FAILURE: Build failed with an exception.
  • Where:

Build file
‘/home/myusername/prjcts/nomadx/settings.gradle’ line: 1

  • What went wrong:
    A problem occurred evaluating root project ‘nomadx’.

Could not find method include() for arguments [:app] on root project ‘nomadx’.

The content of the file settings.gradle

include ':app'

Solution

I solved the problem ; for those who have the same issue : You should build the gradle with the Terminal/console not with Android studio :

./gradlew assembleRelease

Answered By – Mohamed ALOUANE

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published