I have been working an a flutter project that requires to upload video and thumbnail.
I used flutter video_compress package to compress the video and get a thumbnail.
After Adding video_compress package to pubspec.yaml file i found this error.
* 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
* 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 25s
Exception: Gradle task assembleDebug failed with exit code 1
I tried flutter clean and flutter pub get command but build results same error.
My code in video Controller is.
_compressVideo(String videoPath) async {
final compressedVideo = await VideoCompress.compressVideo(
videoPath,
quality: VideoQuality.MediumQuality,
);
return compressedVideo!.file;
}
_getThumbnail(String videoPath) async {
final thumbnail = await VideoCompress.getFileThumbnail(videoPath);
return thumbnail;
}
Related
I created new flutter app project.
And I start flutter run with android emulator.
But it shows below error message.
Why does it happen and How can I resolve this issue?
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:packageDebug'.
> A failure occurred while executing com.android.build.gradle.tasks.PackageAndroidArtifact$IncrementalSplitterRunnable
> java.io.IOException: Failed to generate v1 signature
* 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 27s
Running Gradle task 'assembleDebug'... 28.3s
Exception: Gradle task assembleDebug failed with exit code 1
Below error occurred while running command ionic cordova build android. But when I check the location mentioned in the error, the file exists still getting this error.
Task :app:checkDebugAarMetadata FAILED
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 :tbxml-android:.
Searched in the following locations:
- file:/S:/Developer/Projects/driver-app/platforms/android/app/src/main/libs/tbxml-android.aar
- file:/S:/Developer/Projects/driver-app/platforms/android/app/libs/tbxml-android.aar
- file:/S:/Developer/Projects/driver-app/platforms/android/libs/tbxml-android.aar
Required by:
project :app
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.
Building with sound null safety
Running Gradle task 'assembleRelease'...
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 find builder-4.1.0.jar (com.android.tools.build:builder:4.1.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/build/builder/4.1.0/builder-4.1.0.jar
Could not find bundletool-0.14.0.jar (com.android.tools.build:bundletool:0.14.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/build/bundletool/0.14.0/bundletool-0.14.0.jar
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 6s
Running Gradle task 'assembleRelease'... 10.9s
Gradle task assembleRelease failed with exit code 1
Process finished with exit code 1
Try to build your project with following three steps:
1- flutter build apk --debug
2- flutter build apk --profile
3- flutter build apk --release
I try to build my flutter project, last month it was fine when I was doing flutter build apk but when I do flutter build apk for now.. I get this error log
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:compileReleaseKotlin'.
> Could not resolve all task dependencies for configuration ':app:releaseCompileClasspath'.
> Could not resolve com.google.android.gms:play-services-location:16.+.
Required by:
project :app > project :location
> Failed to list versions for com.google.android.gms:play-services-location.
> Unable to load Maven meta-data from https://google.bintray.com/exoplayer/com/google/android/gms/play-services-location/maven-metadata.xml.
> Could not get resource 'https://google.bintray.com/exoplayer/com/google/android/gms/play-services-location/maven-metadata.xml'.
> Could not GET 'https://google.bintray.com/exoplayer/com/google/android/gms/play-services-location/maven-metadata.xml'. Received status code 403 from server: Forbidden
* 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 21s
and here is build.gradle: https://gist.github.com/wahyu-handayani/b38f1cc491816c6dcfeb130ab42cdbef
and build.gradle inside android folder:
https://gist.github.com/wahyu-handayani/2ab88f81869ef9a0e1575a465847e608
is there a way to solve this ?
I am trying to run flutter project on my phone but I get this exception:
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 find com.android.tools.build:gradle:4.1.3.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/4.1.3/gradle-4.1.3.pom
- https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/4.1.3/gradle-4.1.3.jar
- https://jcenter.bintray.com/com/android/tools/build/gradle/4.1.3/gradle-4.1.3.pom
- https://jcenter.bintray.com/com/android/tools/build/gradle/4.1.3/gradle-4.1.3.jar
Required by:
project :
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 2s
Exception: Gradle task assembleDebug failed with exit code 1
Please try the following steps:
Delete the android directory.
Run flutter clean comment
Run flutter create . comment
Run flutter pub get comment
Run the application.