3

Flutter project stopped building today all of a sudden.

Here's the full error:


* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Could not resolve all dependencies for configuration ':app:debugCompileClasspath'.
   > Problems reading data from Binary store in /private/var/folders/_5/q7ql37gj5k7f37d865zhzl8c0000gn/T/gradle18017070233811730283.bin offset 35036 exists? true

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 28s
Running Gradle task 'assembleDebug'...                             29.7s
Exception: Gradle task assembleDebug failed with exit code 1

I have tried:

flutter clean, deleted pubspec.lock and flutter pub cache repair to get rid of cache and reinstall packages but nothing.

flutter downgrade, got the same error.

Fresh reinstall of flutter, same thing.

Fresh git clone of the project, nothing.

Any hints?

Here's my flutter doctor -v:

[✓] Flutter (Channel stable, 2.8.1, on macOS 12.1 21C52 darwin-arm, locale
    en-GB)
    • Flutter version 2.8.1 at /Users/gracielacarrillo/Development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 77d935af4d (4 weeks ago), 2021-12-16 08:37:33 -0800
    • Engine revision 890a5fca2e
    • Dart version 2.15.1

[✓] Android toolchain - develop for Android devices (Android SDK version
    31.0.0)
    • Android SDK at /Users/gracielacarrillo/Library/Android/sdk
    • Platform android-31, build-tools 31.0.0
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2020.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)

[✓] VS Code (version 1.63.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.32.0

[✓] Connected device (2 available)
    • sdk gphone arm64 (mobile) • emulator-5554 • android-arm64  • Android 11
      (API 30) (emulator)
    • Chrome (web)              • chrome        • web-javascript • Google
      Chrome 97.0.4692.71

• No issues found!
Graciela Carrillo
  • 894
  • 11
  • 17
  • 1
    Did you run: flutter pub get? If yes, open the android module of the project in Android Studio and sync Gradle. – Varun Kumar Jan 16 '22 at 12:41
  • @VarunKumar I did. Just went to sync Gradle and got this: `Could not GET 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugin/maven-metadata.xml'. Received status code 502 from server: Bad Gateway Disable Gradle 'offline mode' and sync project`. I've disabled offline mode but still getting the same error. I can see Bintray is down: https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugin/maven-metadata.xml Any workarounds? Thanks! – Graciela Carrillo Jan 16 '22 at 13:39
  • Make sure offline mode is inactive. If the icon is highlighted it is active. If inactive, then upgrade the Gradle version in the project structure. – Varun Kumar Jan 16 '22 at 13:57
  • @VarunKumar Thanks, same error though. It's offline and it's still trying giving me : `Could not GET 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugin/maven-metadata.xml'. Received status code 502 from server: Bad Gateway Disable Gradle 'offline mode' and sync project`. I've disabled offline and restarted android studio. Nothing. Updated to 7.3.3 Gradle Version, Android Gradle Plugin Version is 4.1 – Graciela Carrillo Jan 16 '22 at 14:06

1 Answers1

2

Maybe you are getting errors because of jcenter. Follow the link and switch to mavenCenteral.

Switch to Maven Central

Varun Kumar
  • 524
  • 3
  • 13
  • 1
    I switches to mavenCentral, upgraded to `classpath 'com.android.tools.build:gradle:4.2.0'`. After that, I got a "Manifest merger failed targeting Android 12" error, which I solved with this post: https://stackoverflow.com/questions/67654506/manifest-merger-failed-targeting-android-12 And is now finally running. You're a star mate. Thanks! – Graciela Carrillo Jan 16 '22 at 14:55