1

I received the following error while trying to build flutter app on Android Studio

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Could not find com.otaliastudios:transcoder:0.9.1.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/com/otaliastudios/transcoder/0.9.1/transcoder-0.9.1.pom
       - https://repo.maven.apache.org/maven2/com/otaliastudios/transcoder/0.9.1/transcoder-0.9.1.pom
       - https://storage.googleapis.com/download.flutter.io/com/otaliastudios/transcoder/0.9.1/transcoder-0.9.1.pom
     Required by:
         project :app > project :video_compress

I tried flutter clean flutter pub cache repair and also deleting pubspec.lock .. still the problem isn't solved

Here is the result of flutter doctor

[√] Flutter (Channel stable, 3.3.4, on Microsoft Windows [Version 10.0.22621.819], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
[√] Chrome - develop for the web
[X] Visual Studio - develop for Windows
    X Visual Studio not installed; this is necessary for Windows development.
      Download at https://visualstudio.microsoft.com/downloads/.
      Please install the "Desktop development with C++" workload, including all of its default components
[√] Android Studio (version 2021.2)
[√] VS Code (version 1.73.1)
[√] VS Code, 64-bit edition (version 1.64.1)
[√] Connected device (4 available)
[√] HTTP Host Availability

2

2 Answers 2

11

I was able to find a solution by adding this line in the project level build.gradle thanks to this answer

allprojects {
    repositories {
        google()
        mavenCentral()
        maven { url "https://plugins.gradle.org/m2/" } //Added this line
    }
}

Another solution that also worked for me but uses jcenter() which apparently reached end of service

allprojects {
    repositories {
        google()
        jcenter() //instead of mavenCentral()
    }
}

apparently it's gradle servers problem but not sure if this is the best solution, however it worked for me.

Sign up to request clarification or add additional context in comments.

1 Comment

good job dud ..
0

in my case, deleting pubspec.lock and then run flutter pub get to generate the file again fixed the issue.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.