无法构建CastVideos-android,错误:路径名错误

时间:2014-08-30 07:44:33

标签: android android-gradle chromecast

我已经从github克隆了存储库CastVideos-android和CastCompanionLibrary-android到我的AndroidStudioProjects文件夹,名称为' CastVideos'和' CastCompanionLibrary'。当我尝试构建CastVideos时,在Android Studio中我得到了

Gradle 'CastVideos' project refresh failed
Error:Bad pathname

当我运行' gradlew.bat build'在CastVideos目录中,我得到以下内容:

C:\Users\Tim\AndroidStudioProjects\CastVideos>gradlew.bat build
Relying on packaging to define the extension of the main artifact has been depre
cated and is scheduled to be removed in Gradle 2.0

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'CastVideos'.
> Could not normalize path for file 'C:\Users\Tim\AndroidStudioProjects\CastVide
os\build\intermediates\exploded-aar\CastVideos...\CastCompanionLibrary\unspecifi
ed\debug'.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.

BUILD FAILED

Total time: 7.701 secs

C:\Users\Tim\AndroidStudioProjects\CastVideos>

这是我在使用Eclipse开发后首次尝试使用Android Studio,因此我有点迷失。有什么建议吗?

2 个答案:

答案 0 :(得分:1)

我想我知道为什么。这是Windows的事情。似乎Windows没有意识到“..”意味着上层目录。这就是为什么你有这条路径"C:\Users\Tim\AndroidStudioProjects\CastVide os\build\intermediates\exploded-aar\CastVideos...\CastCompanionLibrary\unspecifi ed\debug"我在mac上运行似乎工作正常

我建议您将整个CastCompanionLibrary复制到CastVideo目录中,然后将..:CastCompanionLibraries更改为:CastCompanionLibraries

答案 1 :(得分:1)

..:./..:中更改build.gradlesettings.gradle的相对路径在Windows上为我工作。