Can't update to com.google.gms:google-services:4.2.0

前端 未结 4 1811
悲哀的现实
悲哀的现实 2021-01-05 12:09

At start google-services ver. is classpath \'com.google.gms:google-services:4.1.0\', but when I change it to 4.2.0 the error occurs during Sy

4条回答
  •  清酒与你
    2021-01-05 12:51

    I have the same problem when I'm trying to update to com.google.gms:google-services:4.2.0. Deleting the gradle cache also did not help.

    The only thing which made the AIOOBE dissapear was completely commenting out the app's maven repo dependencies.

      android {
        ...
        dependencies {
    
          // commented out
          // implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    
          // this works
          implementation fileTree(dir: 'libs/dropbox', includes: ['dropbox*.jar', 'json*.jar'])**
    
        }
      }
    

    As you can see in my example, local file dependencies work. However, this is not the solution, maybe only a step in the direction of finding the cause of the error.

    After more digging:

    It looks like a bug of the google services plugin, and more exactly a bug of the StrictVersionMatcherPlugin which is automatically added with the google play services plugin.

    They are checking version of the firebase and play-services libraries and somehow the check runs into an exception. It's a string.indexOf which bugs around.

    if (depFromString.startsWith("project ")) { // TODO(paulrashidi): Figure out if a third level dependency shows depFromString. // In a project with other project dependencies the dep // string will be "project :module1" String depName = depFromString.split(":")[1];

    depName is project :, so split[1] will fail

提交回复
热议问题