Skip to content Skip to sidebar Skip to footer

Illegalaccesserror: Tried To Access Method Com.google.common.io.files.filetreetraverser()

I'm getting the following error on all app builds since this morning: FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':MyProject:transformCl

Solution 1:

ext.kotlin_version = '1.3.31'

and

classpath 'com.android.tools.build:gradle:3.3.0'

and if you have

classpath 'com.google.gms:google-services:4.3.0'

Solution 2:

The problem turned out to be in Artifactory's Build Info Extractor.

We were pointing to the latest release of the library so when they released a new version (on the 10th of Feb) we didn't notice. Downgrading to the one before the last version helped for some builds but not all, so we had to go two versions down:

Instead of

classpath "org.jfrog.buildinfo:build-info-extractor-gradle:latest.release"

Use

classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.9.0"

Solution 3:

I met the same problem in my flutter project. I fixed by steps as below:

update file: /android/build.gradle

  • change: ext.kotlin_version

ext.kotlin_version = '1.3.31'

  • change: com.android.tools.build:gradle
dependencies {
  classpath 'com.android.tools.build:gradle:3.3.0'
  ...

Hopefully, it's helpful.

Solution 4:

I met the same error in my flutter app and the following steps solved my problem:

  1. In the build script, change the kotline version to

    buildscript {
        ext.kotlin_version =  '1.3.31'
    }
    
  2. Within the dependencies make sure the version of gradle is

    dependencies {
        classpath 'com.android.tools.build:gradle:3.3.0'
    }
    
  3. Also make sure the dependency version of google services is:

    dependencies {
        classpath 'com.google.gms:google-services:4.3.2'
    }
    

Solution 5:

I solved the error by changing

classpath 'com.google.gms:google-services:4.3.3'

to

classpath 'com.google.gms:google-services:4.2.0'

in my gradle

Post a Comment for "Illegalaccesserror: Tried To Access Method Com.google.common.io.files.filetreetraverser()"