Home > Net >  how solve error Could not find gradle-7.2.1.jar (com.android.tools.build:gradle:7.2.1)?
how solve error Could not find gradle-7.2.1.jar (com.android.tools.build:gradle:7.2.1)?

Time:01-13

Hi one of my flutter Project that work without problem last month ago. now when want run it again and change some part I get this error. how can fix this?

Launching lib\main.dart on Android SDK built for x86 in debug mode... Running Gradle task 'assembleDebug'...

FAILURE: Build failed with an exception.

  • What went wrong: A problem occurred configuring project ':flutter_plugin_android_lifecycle'.

Could not resolve all files for configuration ':flutter_plugin_android_lifecycle:classpath'. Could not find gradle-7.2.1.jar (com.android.tools.build:gradle:7.2.1). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/7.2.1/gradle-7.2.1.jar Could not find lint-model-30.2.1.jar (com.android.tools.lint:lint-model:30.2.1). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-model/30.2.1/lint-model-30.2.1.jar Could not find builder-7.2.1.jar (com.android.tools.build:builder:7.2.1). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/build/builder/7.2.1/builder-7.2.1.jar Could not find manifest-merger-30.2.1.jar (com.android.tools.build:manifest-merger:30.2.1). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/build/manifest-merger/30.2.1/manifest-merger-30.2.1.jar Could not find sdk-common-30.2.1.jar (com.android.tools:sdk-common:30.2.1). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/sdk-common/30.2.1/sdk-common-30.2.1.jar Could not find sdklib-30.2.1.jar (com.android.tools:sdklib:30.2.1). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/sdklib/30.2.1/sdklib-30.2.1.jar Could not find repository-30.2.1.jar (com.android.tools:repository:30.2.1). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/repository/30.2.1/repository-30.2.1.jar Could not find gradle-api-7.2.1.jar (com.android.tools.build:gradle-api:7.2.1). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle-api/7.2.1/gradle-api-7.2.1.jar Could not find builder-test-api-7.2.1.jar (com.android.tools.build:builder-test-api:7.2.1). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-test-api/7.2.1/builder-test-api-7.2.1.jar Could not find ddmlib-30.2.1.jar (com.android.tools.ddms:ddmlib:30.2.1). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/ddms/ddmlib/30.2.1/ddmlib-30.2.1.jar Could not find aaptcompiler-7.2.1.jar (com.android.tools.build:aaptcompiler:7.2.1). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/build/aaptcompiler/7.2.1/aaptcompiler-7.2.1.jar Could not find aapt2-proto-7.2.1-7984345.jar (com.android.tools.build:aapt2-proto:7.2.1-7984345). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/build/aapt2-proto/7.2.1-7984345/aapt2-proto-7.2.1-7984345.jar Could not find crash-30.2.1.jar (com.android.tools.analytics-library:crash:30.2.1). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/crash/30.2.1/crash-30.2.1.jar Could not find tracker-30.2.1.jar (com.android.tools.analytics-library:tracker:30.2.1). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/tracker/30.2.1/tracker-30.2.1.jar Could not find shared-30.2.1.jar (com.android.tools.analytics-library:shared:30.2.1). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/shared/30.2.1/shared-30.2.1.jar Could not find lint-typedef-remover-30.2.1.jar (com.android.tools.lint:lint-typedef-remover:30.2.1). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-typedef-remover/30.2.1/lint-typedef-remover-30.2.1.jar Could not find databinding-compiler-common-7.2.1.jar (androidx.databinding:databinding-compiler-common:7.2.1). Searched in the following locations: https://dl.google.com/dl/android/maven2/androidx/databinding/databinding-compiler-common/7.2.1/databinding-compiler-common-7.2.1.jar Could not find databinding-common-7.2.1.jar (androidx.databinding:databinding-common:7.2.1). Searched in the following locations: https://dl.google.com/dl/android/maven2/androidx/databinding/databinding-common/7.2.1/databinding-common-7.2.1.jar Could not find baseLibrary-7.2.1.jar (com.android.databinding:baseLibrary:7.2.1). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/databinding/baseLibrary/7.2.1/baseLibrary-7.2.1.jar Could not find layoutlib-api-30.2.1.jar (com.android.tools.layoutlib:layoutlib-api:30.2.1). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/layoutlib/layoutlib-api/30.2.1/layoutlib-api-30.2.1.jar Could not find android-device-provider-ddmlib-proto-30.2.1.jar (com.android.tools.utp:android-device-provider-ddmlib-proto:30.2.1). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/utp/android-device-provider-ddmlib-proto/30.2.1/android-device-provider-ddmlib-proto-30.2.1.jar Could not find android-device-provider-gradle-proto-30.2.1.jar (com.android.tools.utp:android-device-provider-gradle-proto:30.2.1). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/utp/android-device-provider-gradle-proto/30.2.1/android-device-provider-gradle-proto-30.2.1.jar Could not find android-test-plugin-host-additional-test-output-proto-30.2.1.jar (com.android.tools.utp:android-test-plugin-host-additional-test-output-proto:30.2.1). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/utp/android-test-plugin-host-additional-test-output-proto/30.2.1/android-test-plugin-host-additional-test-output-proto-30.2.1.jar Could not find android-test-plugin-host-coverage-proto-30.2.1.jar (com.android.tools.utp:android-test-plugin-host-coverage-proto:30.2.1). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/utp/android-test-plugin-host-coverage-proto/30.2.1/android-test-plugin-host-coverage-proto-30.2.1.jar Could not find android-test-plugin-host-retention-proto-30.2.1.jar (com.android.tools.utp:android-test-plugin-host-retention-proto:30.2.1). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/utp/android-test-plugin-host-retention-proto/30.2.1/android-test-plugin-host-retention-proto-30.2.1.jar Could not find android-test-plugin-result-listener-gradle-proto-30.2.1.jar (com.android.tools.utp:android-test-plugin-result-listener-gradle-proto:30.2.1). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/utp/android-test-plugin-result-listener-gradle-proto/30.2.1/android-test-plugin-result-listener-gradle-proto-30.2.1.jar Could not find builder-model-7.2.1.jar (com.android.tools.build:builder-model:7.2.1). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-model/7.2.1/builder-model-7.2.1.jar Could not find dvlib-30.2.1.jar (com.android.tools:dvlib:30.2.1). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/dvlib/30.2.1/dvlib-30.2.1.jar Could not find common-30.2.1.jar (com.android.tools:common:30.2.1). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/common/30.2.1/common-30.2.1.jar Could not find apkzlib-7.2.1.jar (com.android.tools.build:apkzlib:7.2.1). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/build/apkzlib/7.2.1/apkzlib-7.2.1.jar Could not find protos-30.2.1.jar (com.android.tools.analytics-library:protos:30.2.1). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/protos/30.2.1/protos-30.2.1.jar Could not find signflinger-7.2.1.jar (com.android:signflinger:7.2.1). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/signflinger/7.2.1/signflinger-7.2.1.jar Could not find zipflinger-7.2.1.jar (com.android:zipflinger:7.2.1). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/zipflinger/7.2.1/zipflinger-7.2.1.jar Could not find annotations-30.2.1.jar (com.android.tools:annotations:30.2.1). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/annotations/30.2.1/annotations-30.2.1.jar Could not find apksig-7.2.1.jar (com.android.tools.build:apksig:7.2.1). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/build/apksig/7.2.1/apksig-7.2.1.jar Failed to notify project evaluation listener. Could not get unknown property 'android' for project ':flutter_plugin_android_lifecycle' of type org.gradle.api.Project. Could not get unknown property 'android' for project ':flutter_plugin_android_lifecycle' of type org.gradle.api.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.

BUILD FAILED in 2s Exception: Gradle task assembleDebug failed with exit code 1

CodePudding user response:

on windows and Gradle:3.5.0 . any package using this Gradle Version has Error. so you have to cleans caches

C:\Users\<MY_ACCOUNT>\.gradle\caches 

and then, resync the project to an android module then flutter clean and flutter pub get

  • Related