Jyo
Jyo

Reputation: 461

Build failed- Flutter

I had to reinstall my windows and so I had to freshly install Android studio, flutter sdk and everything. After completing all my installations I am unable to run my project. Before upgrading the system my project was working all fine with 0 errors.

Flutter doctor:

C:\Users\Admin>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.17.5, on Microsoft Windows [Version 10.0.18362.959], locale en-GB)

[√] Android toolchain - develop for Android devices (Android SDK version 30.0.1)
[√] Android Studio (version 4.0)
[√] Connected device (1 available)

• No issues found!

Error:

Launching lib\main.dart on Mobile in debug mode...
Running Gradle task 'assembleDebug'...

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':agora_rtc_engine:extractDebugAnnotations'.
> Could not resolve all files for configuration ':agora_rtc_engine:lintClassPath'.
   > Could not download kotlin-compiler.jar (com.android.tools.external.com-intellij:kotlin-compiler:26.6.3)
      > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/external/com-intellij/kotlin-compiler/26.6.3/kotlin-compiler-26.6.3.jar'.
         > Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/external/com-intellij/kotlin-compiler/26.6.3/kotlin-compiler-26.6.3.jar'.
            > dl.google.com
   > Could not download uast.jar (com.android.tools.external.org-jetbrains:uast:26.6.3)
      > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/external/org-jetbrains/uast/26.6.3/uast-26.6.3.jar'.
         > Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/external/org-jetbrains/uast/26.6.3/uast-26.6.3.jar'.
            > dl.google.com
   > Could not download groovy-all.jar (org.codehaus.groovy:groovy-all:2.4.15)
      > Could not get resource 'https://jcenter.bintray.com/org/codehaus/groovy/groovy-all/2.4.15/groovy-all-2.4.15.jar'.
         > Could not GET 'https://jcenter.bintray.com/org/codehaus/groovy/groovy-all/2.4.15/groovy-all-2.4.15.jar'.
            > jcenter.bintray.com

* 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 1m 46s
Exception: Gradle task assembleDebug failed with exit code 1

This is the first time I am moving my project from my original system to this new one.

Upvotes: 1

Views: 243

Answers (2)

Jyo
Jyo

Reputation: 461

Solution: As of now what I have done is the following:

  1. agora_rtc_engine that was showing up as error I have removed it. (I will be re-adding this package as this is required for my app)
  2. java jdk download i have added I was getting error on keytool to generate SHA1 Key Fingerprint.
  3. I updated my SHA1 Key Fingerprint in Firebase. I have to do this as I was getting error when login in using Google sign-in.

Now my App is working fine with no errors.

This might not be the correct solution for the issue, so feel free to give your suggestion on the above error that I had faced.

Upvotes: 0

HBS
HBS

Reputation: 670

I don't have enough reputation to comment so I will write it as an answer. Since it is the first time running the app, make sure you have an internet connection so it can download the required files.

Upvotes: 2

Related Questions