【问题标题】:Error:(27, 0) Project with path ':library' could not be found in project ':app'错误:(27, 0) 在项目 ':app' 中找不到路径为 ':library' 的项目
【发布时间】:2016-06-07 19:17:30
【问题描述】:

我已将this library 文件夹复制到项目的根目录,但总是得到:

Error:(27, 0) Project with path ':library' could not be found in project ':app'.
<a href="openFile:/home/oreo/Projects/RippleSample/app/build.gradle">Open File</a>

这是项目结构:

RippleSample
   > .gradle
   > .idea
   > app
   > gradle
   > library [just imported]

【问题讨论】:

  • 请添加您的 build.gradle 文件和您的 settings.gradle 文件。

标签: android android-studio android-gradle-plugin build.gradle libs


【解决方案1】:

在项目根目录下创建settings.gradle文件并添加

include ':library' 

到文件。就像这张图片:

【讨论】:

  • 它节省了一天。谢谢
【解决方案2】:

在您的RippleSample/settings.gradle 中您必须添加:

include ':app' , ':library'

【讨论】:

    【解决方案3】:

    将jar放入libs文件夹

    右键单击它并点击“添加为库”

    确保编译文件('libs/jar')在你的 build.gradle 文件中

    做一个干净的构建

    【讨论】:

    • 添加 .jar 库的正确答案(不在本例中)
    猜你喜欢
    • 1970-01-01
    • 2023-04-08
    • 2016-05-27
    • 1970-01-01
    • 2019-03-10
    • 2018-08-23
    • 1970-01-01
    • 1970-01-01
    • 2014-07-01
    相关资源
    最近更新 更多