skip to Main Content

I downloaded a Flutter project from 4 years ago, and I want to work on top of it. I already have an old version of the Flutter SDK, so I don’t have problems with the dependencies. But for some reason, I can’t run the app because of a problem in my Android folder. The error message is long, really long, but it looks like this:"

Error running Gradle:
ProcessException: Process "C:Userspochocloyoutube-search-flutter-bloc-masterandroidgradlew.bat" exited abnormally:
Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use –status for details

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring root project ‘android’.

Could not resolve all artifacts for configuration ‘:classpath’.
Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.71.
Required by:
project :
> Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.71.
> Could not get resource ‘https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugin/1.2.71/kotlin-gradle-plugin-1.2.71.pom’.
> Could not GET ‘https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugin/1.2.71/kotlin-gradle-plugin-1.2.71.pom’.
> sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Could not resolve org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.2.71.
Required by:
project : > com.android.tools.build:gradle:3.2.1


BUILD FAILED in 10s
Command: C:Userspochocloyoutube-search-flutter-bloc-masterandroidgradlew.bat app:properties

I don’t know what to do; help is higly appreciated 🙂

2

Answers


  1. JCenter shut down in 2021: https://blog.gradle.org/jcenter-shutdown.

    Try replacing jcenter() with mavenCentral() wherever it occurs.

    Login or Signup to reply.
  2. There are two solutions.

    1. Downgrade your sdk

    You can downgrade your sdk to run the project. For that, you can use

    flutter downgrade <version>
    

    you can also use FVM if you don’t want to change your current sdk, you can use FVM to download another sdk. You can read more here.

    2. Migrate your project

    It’s a bit challenging as there will be many breaking changes but you can do it step by step. See flutter documentation and you can also check it

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search