Problems reading data from Binary store from tmp folder

Viewed 1043

Getting this error

* What went wrong:
Could not determine the dependencies of task ':app:lintVitalRelease'.
> Could not resolve all dependencies for configuration ':app:debugCompileClasspath'.
   > Problems reading data from Binary store in /tmp/gradle16425735337117079234.bin offset 753438 exists? true

Result of flutter doctor

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.10.5, on Manjaro Linux 5.15.32-1-MANJARO, locale en_IN)
[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.1)
[✓] Connected device (1 available)
[✓] HTTP Host Availability

• No issues found!

Content of android/build.gradle

buildscript {
    ext.kotlin_version = '1.6.10'
    repositories {
        google()
        jcenter()
        mavenCentral()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:4.1.0'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath 'com.google.gms:google-services:4.3.8'
        classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.0'
    }
}

allprojects {
    repositories {
        google()
        jcenter()
        mavenCentral()
        maven { url 'https://jitpack.io' }
        maven { url 'http://developer.huawei.com/repo/' }
    }
}
rootProject.buildDir = '../build'
subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
    project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
7 Answers

Same. Repository failure? I haven't changed any of the underlying android grade files etc. I wonder if it's something to do wit jcenter() being offline now...

Yes jcenter is not working for some of the libraries.

Removing jcenter() from android/build.gralde fixed this issue. Also, make sure all your libraries are present on maven. Or else you will get an "Not Found" error while building.

You'd need Android Studio 4.1, which matches these build tools:

com.android.tools.build:gradle:4.1.0

eg. for Android Studio Chipmunk, this would already be 7.2.0. And remove jcenter().

in app level build.gradle change this line // implementation 'com.facebook.android:facebook-login:[5,6)' to this implementation 'com.facebook.android:facebook-login:6'

you just need to change this line in build.gradle

implementation 'com.facebook.android:facebook-core:[4,5)'

to this

implementation 'com.facebook.android:facebook-core:5'

OR This implementation 'com.facebook.android:facebook-android-sdk:[5,6)'

to this

implementation 'com.facebook.android:facebook-android-sdk:6'

I spent almost 4 days trying to solve this issue and finally I found the solution for my project. For me, the problem was with the library location: ^2.3.5, once I removed my project came back to life.

What I recommend to do: copy your project folder, replace /lib with the standard flutter create template and start removing dependencies in the pubspec.yaml one by one until you find which one is causing the problem.

Related