how to solve Execution failed for task ':app:checkDebugAarMetadata' - android

I am trying to open existing android project in android studio and it gradle cannot build the app without the error
Execution failed for task ':app:checkDebugAarMetadata'.
Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
Could not find com.google.firebase:firebase-analytics:.
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.

For our Flutter Project: Navigate to app-level build.gradle file. Change compileSdkVersion from 30 to 31 and Change targetSdkVersion from 30 to 31

Related

Android build issue with 'scan' plugin - Flutter

Android build failing with following exception.
Plugin: scan [https://pub.dev/packages/scan]
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:mergeDevReleaseAssets'.
Could not resolve all files for configuration ':app:devReleaseRuntimeClasspath'.
Could not resolve com.huawei.hms:scanplus:2.1.0.300.
Required by:
project :app > project :scan
> Could not resolve com.huawei.hms:scanplus:2.1.0.300.
> Could not get resource 'https://google.bintray.com/exoplayer/com/huawei/hms/scanplus/2.1.0.300/scanplus-2.1.0.300.pom'.
> Could not GET 'https://google.bintray.com/exoplayer/com/huawei/hms/scanplus/2.1.0.300/scanplus-2.1.0.300.pom'. Received status code 502 from server: Bad Gateway
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 2m 59s
add: maven {url 'http://developer.huawei.com/repo'}
check your build.gradle

Flutter: upgrading firebase_ml_vision dependency from 0.9.x to 0.10.0

My flutter project runs fine with Firebase ML Vision 0.9.x, if I try to upgrade to 0.10.0 (or higher), it yields the following errors:
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* Where:
Build file 'C:\Users\...\Cache\hosted\pub.dartlang.org\firebase_ml_vision-0.10.0\android\build.gradle' line: 26
* What went wrong:
A problem occurred evaluating project ':firebase_ml_vision'.
> Could not find the firebase_core FlutterFire plugin, have you added it as a dependency in your pubspec?
* 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.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
A problem occurred configuring project ':firebase_ml_vision'.
> compileSdkVersion is not specified. Please add it to build.gradle
* 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 889ms
Exception: Gradle task assembleDebug failed with exit code 1
The first of those two errors is weird because the setup instructions and the package install guidelines both say that firebase_core is not required (anymore).
The second is just plain wrong, as my app's build.gradle specifies compileSdkVersion 30 and the firebase_ml_vision package's build.gradle specifies compileSdkVersion 29.
Any ideas what's going on?
Found a solution that works:
Ignore the setup instructions and add firebase_core as a dependency. Then, add the 'implementations' according to this thread to solve the 'Duplicate class' issues.

could not resolve all dependencies for configuration ':classpath' on flutter

hi recently I upgrade and flutter to v2 and my android studio too but after that my flutter app gives a Gradle error and cant be extracted I tried too hard to do many solutions like but maven in dependency but it still gives an error.the gradle version is now 5.6 or something and one more thing all the application running well still which i made before upgrade and its gradle version is
Please help me out and the error is given below.
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'android'.
Could not resolve all dependencies for configuration ':classpath'.
Could not load module metadata from C:\Users\dell.gradle\caches\modules-2\metadata-2.96\descriptors\com.android.tools\annotations\27.1.0\11cd36a7dcab7d14d0c14c5e6c7582e3\descriptor.bin
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 20s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)

I have updated flutter and android studio. now any new dependencies are not installing

I am beginner in flutter and I have updated flutter and android studio. now any new dependencies are not installing.
When try to build it gives fallowing error.
Note: C:\Users{user
name}AppData\Local\Pub\Cache\hosted\pub.dartlang.org\flutter_tts-2.1.0\android\src\main\java\com\tundralabs\fluttertts\FlutterTtsPlugin.java
uses or overrides a deprecated API. Note: Recompile with
-Xlint:deprecation for details.
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':flutter_tts:extractDebugAnnotations'.
Could not resolve all files for configuration ':flutter_tts:lintClassPath'.
Could not download lint-checks-27.1.1.jar (com.android.tools.lint:lint-checks:27.1.1)
> Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-checks/27.1.1/lint-checks-27.1.1.jar'.
> Tag mismatch!
Could not download kotlin-compiler-27.1.1.jar (com.android.tools.external.com-intellij:kotlin-compiler:27.1.1)
> Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/external/com-intellij/kotlin-compiler/27.1.1/kotlin-compiler-27.1.1.jar'.
> Tag mismatch!
Could not download uast-27.1.1.jar (com.android.tools.external.org-jetbrains:uast:27.1.1)
> Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/external/org-jetbrains/uast/27.1.1/uast-27.1.1.jar'.
> Tag mismatch!
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 17s Exception: Gradle task assembleDebug failed
with exit code 1

How to solve error "FAILURE:Build failed with an exception" in android studio?

FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:mergeDebugResources'.
Could not resolve all files for configuration ':app:_internal_aapt2_binary'.
Could not resolve com.android.tools.build:aapt2:3.6.0-6040484.
Required by:
project :app
No cached version of com.android.tools.build:aapt2:3.6.0-6040484 available for offline mode.
No cached version of com.android.tools.build:aapt2:3.6.0-6040484 available for offline mode.
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 267ms
5 actionable tasks: 1 executed, 4 up-to-date
Go to settings/build, execution, Deployment/ gradle/ and uncheck offline work and run build again
If all the think is best but not work you add this line
defaultConfig {
applicationId "com.sendpulse.sendpulse"
minSdkVersion 15
targetSdkVersion 21
multiDexEnabled true //Add me//
}

Categories

Resources