Android Studio 2.2 Google play services sync Error

前端 未结 4 1868
情深已故
情深已故 2020-12-14 17:47

I have update to android studio 2.2

I started a new project and i included

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

相关标签:
4条回答
  • 2020-12-14 18:10

    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).

    0 讨论(0)
  • 2020-12-14 18:13

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

    0 讨论(0)
  • 2020-12-14 18:14

    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 {
           ...
        }
    }
    
    0 讨论(0)
  • 2020-12-14 18:18

    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

    0 讨论(0)
提交回复
热议问题