无法解析':app @ debugUnitTest / compileClasspath'的依赖项:无法解析项目

时间:2019-09-23 11:39:01

标签: android

我是Android Studio的新手,遇到以下错误。

错误:无法解析':app @ debug / compileClasspath'的依赖关系:无法解析项目:floatinglibrary。 显示详细资料 受影响的模块:应用

错误:无法解析':app @ debug / compileClasspath'的依赖关系:无法解析项目:datetimepickerlibrary。 显示详细资料 受影响的模块:应用

错误:无法解析':app @ debug / compileClasspath'的依赖关系:无法解析项目:BottomBar。 显示详细资料 建立。 Gradle应用 受影响的模块:应用            enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

1 个答案:

答案 0 :(得分:1)

您正在使用3个库:floatinglibrary,datetimepickerlibrary和BottomBar。 但是gradle无法在您告诉它们的位置找到这些库。

在build.gradle中,将依赖项定义为implementation project(:BottomBar):BottomBar是对库的引用。您还可以在settings.gradle文件中找到此引用,您也可以像这样设置文件路径:

include ':BottomBar', ':other', ':libraries'

project(':BottomBar').projectDir = new File('the/file/path')

相对于项目根目录的“此/文件/路径”。

在极少数情况下,AndroidStudio由于缓存问题而感到困惑。因此,您也可以尝试使用File-> Invalid Caches,然后在Android Studio菜单中重新启动。

可能在此处找到另一个原因:stackblitz