2017-03-02 54 views
0

我通过Android的谷歌地图API教程进步和不断收到以下错误,而试图编译代码。
注意:我知道有一个具有相同错误许多其他的问题,但是,我已经试过张贴在他们的答案(如下所述),我很遗憾还没有进一步向前。谷歌地图API教程 - CurrentPlaceDetailsOnMap - 失败的紧缩文件

Error:Failed to crunch file C:\googleMapsTutorial\android-samples-master\tutorials\CurrentPlaceDetailsOnMap\app\build\intermediates\exploded-aar\com.google.android.gms\play-services-cast-framework\10.0.1\res\drawable-mdpi-v4\quantum_ic_pause_circle_filled_grey600_36.png into C:\googleMapsTutorial\android-samples-master\tutorials\CurrentPlaceDetailsOnMap\app\build\intermediates\res\merged\debug\drawable-mdpi-v4\quantum_ic_pause_circle_filled_grey600_36.png Error:Execution failed for task ':app:mergeDebugResources'. Error: Failed to crunch file C:\googleMapsTutorial\android-samples-master\tutorials\CurrentPlaceDetailsOnMap\app\build\intermediates\exploded-aar\com.google.android.gms\play-services-cast-framework\10.0.1\res\drawable-mdpi-v4\quantum_ic_pause_circle_filled_grey600_36.png into C:\googleMapsTutorial\android-samples-master\tutorials\CurrentPlaceDetailsOnMap\app\build\intermediates\res\merged\debug\drawable-mdpi-v4\quantum_ic_pause_circle_filled_grey600_36.png

  • 我已经完成:

我一派错误,看到的建议,丰富的项目文件夹移动到C盘,以缩短路径长度。正如你所看到的,我已经做到了这一点,而且似乎仍然出现同样的问题。 我也试图在上述两个文件目的地中将文件重新保存为.png文件,但无济于事。

为了澄清,我愿付出一切从“https://github.com/googlemaps/android-samples”下载的zip文件并解压到我的C盘。 我已经将特定教程(CurrentPlaceDetailsOnMap)移到我的C驱动器中。 最后,我在API密钥中添加了保存并运行试图构建应用程序的gradle.properties文件。

如果任何人有如何让过去的上述错误有任何建议/建议,我会吃晚饭欣赏!

回答

0

此错误时会出现你的迪尔斯过长,请移动您的项目更高的目录如C:/或在您的build.grade补充一点:

allprojects { 
    buildDir = "C:/tmp/${rootProject.name}/${project.name}" 

}