首页 > 解决方案 > Gradle Exception in build apk in flutter

问题描述

I got this exception

Could not resolve all dependencies for configuration ':app:debugCompileClasspath'. Problems reading data from Binary store in C:\Users\Bos we Tol\AppData\Local\Temp\gradle7580153242877513998.bin offset 394857 exists? true

but before 2 days I was run it successfully

标签: flutterdartgradle

解决方案


You can fix it by one of:

  1. Change the gradle version to 6.7-all by change distributionUrl in path <YOUR FLUTTER PROJECT>/android/gradle/wrapper/gradle-wrapper.properties to be like:
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
  1. Change the jdk version to 11 by install it and change JAVA_HOME in env. vars.

推荐阅读