Could not determine the dependencies of task ':google_maps_flutter:compileDebugAidl' - flutter

FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':google_maps_flutter:compileDebugAidl'.
> Could not resolve all task dependencies for configuration ':google_maps_flutter:debugCompileClasspath'.
> Could not find com.google.android.gms:play-services-screens.maps:17.0.0.
Required by:
project :google_maps_flutter
* 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 24s
Finished with error: Gradle task assembleDebug failed with exit code 1
I am getting this error, I changed flutter channel, run flutter clean, remove ^ before package version but didn't work.
google_maps_flutter: ^0.5.21+15
How to fix?

It fixed after deleting ~/.pub-cache

Related

After migration of this old project I'm getting this error and I have tried a lot of ways

FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:checkDebugDuplicateClasses'.
A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
Duplicate class com.google.android.exoplayer2.ui.DownloadNotificationHelper found in modules jetified-exoplayer-core-2.17.0-runtime (com.google.android.exoplayer:exoplayer-core:2.17.0) and jetified-exoplayer-ui-2.15.1-runtime (com.google.android.exoplayer:exoplayer-ui:2.15.1)
Go to the documentation to learn how to Fix dependency resolution errors.
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 52s
Exception: Gradle task assembleDebug failed with exit code 1
The old project after migration shows this.

Flutter - audio_session - Could not load compiled classes for build file build.gradle from cache

I am trying to run my flutter project but facing this issue.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':audio_session'.
> Could not load compiled classes for build file 'C:\flutter_2.5.2\.pub-cache\hosted\pub.dartlang.org\audio_session-0.1.6+1\android\build.gradle' from cache.
* 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 1s
Exception: Gradle task assembleDebug failed with exit code 1
I have tried deleting audio_session-0.1.6+1 from the path C:\flutter_2.5.2\.pub-cache\hosted\pub.dartlang.org\ but it didn't work. It is creating the package folder again and again when I build the APK.

Error when running the app, firebase_auth_oauth_web not found?

Plugin project :firebase_auth_oauth_web not found. Please update settings.gradle.
FAILURE: Build failed with an exception.
What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
Could not find com.google.firebase:fir55554ebase-bom:26.4.0.
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.
Get more help at https://help.gradle.org
BUILD FAILED in 12s
Exception: Gradle task assembleDebug failed with exit code 1

Could not resolve all task dependencies for configuration ':google_sign_in:debugCompileClasspath'

App was working completely fine but suddenly it is invoking the following issue.
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':google_sign_in:compileDebugAidl'.
> Could not resolve all task dependencies for configuration ':google_sign_in:debugCompileClasspath'.
> Could not resolve project :google_sign_in_web.
Required by:
project :google_sign_in
> Unable to find a matching configuration of project :google_sign_in_web:
- None of the consumable configurations have attributes.
* 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
Finished with error: Gradle task assembleDebug failed with exit code 1
I have imported the latest google_sign_in package in pubspec.yaml but still facing the same build failed error. Any help please!
Solved it by running following command in flutter terminal:
flutter pub cache repair
All of the packages were downloaded and re-installed again.

gradle error in flutter while adding dependancies

* Error running Gradle:
ProcessException: Process "C:\Users\Lenovo\Music\c\android\gradlew.bat" exited abnormally:
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\Lenovo\Music\c\android\app\build.gradle' line: 24
* What went wrong:
A problem occurred evaluating project ':app'.
> ASCII
* 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 3s
Command: C:\Users\Lenovo\Music\c\android\gradlew.bat app:properties
Finished with error: Please review your Gradle project setup in the android/ folder.