Could not find method include() for arguments [:ap

2019-02-28 09:31发布

问题:

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'

回答1:

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