VideoCompress: Can't build the app for Android while using the package: failed for task ':app:checkDebugAarMetadata'
I am on the latest version video_compress: ^3.1.2
I received the following error while trying to build flutter app for Android on Android Studio because of the package video_compress
When I remove the package from the app the app is built fine, when I add it the following error appears and the app fails to build
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.9, 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
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 2
- Comments: 20
@shyam1s15 @Iamkrishnaa I found a temporary solution somehow after reading this
I added this line in project level build.gradle and it worked
Still don’t know what is the problem I believe it’s maven servers down, but adding this line solved it
Hey My issue is resolved i added jcenter() in build.greadle under the all projects{ repositories{ google() mavenCentral() jcenter() // Add new maven { url “https://plugins.gradle.org/m2/” } … }
also in the buildscript { … repositories { google() jcenter() // Add new mavenCentral() … }
still having the same issue even after adding maven{…} and jcenter() also
after add this maven { url “https://plugins.gradle.org/m2/” } restart vs code / android studio . it is working for me.
I have same problem with you, i resolve it by downgrade just the Android Gridle Plugin Version 8.1.2 to 7.4.2.
Before, my version is Android Gradle Plugin Version : 8.1.2 and Gradle Version : 8.4
Open your project in android studio:
FAILURE: Build failed with an exception.
Add
jcenter()to your build.gradle file:allprojects {repositories {google()mavenCentral()jcenter() // add}}add
jcenter()in build.gradle (android level) undermaven()