Android Studio 2.2 Google play services sync Error

不打扰是莪最后的温柔 提交于 2019-11-28 21:15:30

From what I understood, Failed to crunch file means studio can't process the file. This error usually occurs when you hit Maximum File Path Length Limitation(240 characters) of Windows OS.

I would suggest moving your project into upper directory (like D:\barcode-reader).

The problem is indeed the long file path. However, instead of moving your project, you could change the build directory for your project. This should solve the issue. In your root build.gradle add:

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

Just reduce your file path length, Reduce to maximum 240 characters.

try by adding like this ..

compile 'com.google.android.gms:play-services-vision:9.4.0'

And in Android Studio 2.2 it will automatically add the dependence just select it from 'Assistant' then select service that you want in project and Connect to Firebase

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!