2014-08-30 83 views
0

我已经从github中将两个存储库CastVideos-android和CastCompanionLibrary-android克隆到了我的AndroidStudioProjects文件夹,其名称为“CastVideos”和“CastCompanionLibrary”。当我尝试建立CastVideos,Android Studio中,我得到无法构建CastVideos-android,错误:错误的路径名称

Gradle 'CastVideos' project refresh failed 
Error:Bad pathname 

当我在CastVideos目录下运行“gradlew.bat建设”,我得到了下面:

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,所以我有点失落。有什么建议么?

+0

错误路径中是否有空格或奇怪的字符? – hoomi 2014-08-30 07:50:10

+0

C:\ Users \ Tim \ AndroidStudioProjects \ CastVideos \ build \不存在以开始,C:\ Users \ Tim \ AndroidStudioProjects \ CastCompanionLibrary \ unspecified \ debug也不存在。 – aaearon 2014-08-30 07:58:37

+0

您正在使用这些Android库吗? CastVideos和CastCompanionLibrary – hoomi 2014-08-30 07:59:48

回答

1

我想我知道为什么。这是一个Windows的东西。看来Windows并没有意识到'..'是指上层目录。这就是为什么你有这样的路径"C:\Users\Tim\AndroidStudioProjects\CastVide os\build\intermediates\exploded-aar\CastVideos...\CastCompanionLibrary\unspecifi ed\debug"我上这似乎是工作的罚款在Mac上运行

我建议你复制整个CastCompanionLibrary到您的CastVideo目录,然后改变..:CastCompanionLibraries:CastCompanionLibraries

+0

在第一次尝试构建CastVideos之前,我已经将CastCompanionLibrary-android文件夹重命名为CastCompanionLibrary(因此依赖关系引用和包含将是正确的)。 – aaearon 2014-08-30 08:51:21

+0

我刚刚从这个项目开始,我设法运行它。 – hoomi 2014-08-30 08:52:38

+0

是否可以添加Android Studio上看到的内容以及'build.gradle'打开的屏幕截图? – hoomi 2014-08-30 08:54:42

1

改变相对路径从..:./..:都在build.gradlesettings.gradle在Windows上为我工作。

相关问题