IllegalAccessError: tried to access method com.google.common.io.Files.fileTreeTraverser()
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'
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"
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.