在根项目 Android Studio 上找不到参数 [:app] 的方法 include() [英] Could not find method include() for arguments [:app] on root project Android Studio

查看:31
本文介绍了在根项目 Android Studio 上找不到参数 [:app] 的方法 include()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将一个 android 项目导入到 Android studio,导入后点击绿色运行按钮:

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.

  • 地点:
  • 构建文件'/home/myusername/prjcts/nomadx/settings.gradle' 行:1

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

    • 出了什么问题:评估根项目nomadx"时出现问题.
    • 在根项目 'nomadx' 上找不到参数 [:app] 的方法 include().

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

      文件内容settings.gradle

      include ':app'
      

      推荐答案

      我解决了问题;对于那些有同样问题的人:您应该使用终端/控制台而不是 Android studio 构建 gradle :

      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
      

      这篇关于在根项目 Android Studio 上找不到参数 [:app] 的方法 include()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆