Why does we have problem with gradle? Do you have?
-
I get these messages:
:-1: error: FAILURE: Build failed with an exception.
:-1: error: * What went wrong:
A problem occurred configuring root project 'android-build-appOmniUnitConverter'.Could not resolve all artifacts for configuration 'classpath'.
Could not find com.android.tools.build:gradle:9.0.0.
:-1: error: Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/9.0.0/gradle-9.0.0.pom
- https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/9.0.0/gradle-9.0.0.pom
Required by:
buildscript of root project 'android-build-appOmniUnitConverter'- 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 from a Build Scan (powered by Develocity).
Get more help at https://help.gradle.org.BUILD FAILED in 9s
:-1: error: Building the android package failed!
-- For more information, run this command with --verbose. -
The problem is almost always a network/proxy that prevents Gradle from downloading AGP 9.0.0 (the version itself is fine) — try running with --refresh-dependencies, and if that doesn't help, check/set the proxy in gradle.properties.
-
The problem is almost always a network/proxy that prevents Gradle from downloading AGP 9.0.0 (the version itself is fine) — try running with --refresh-dependencies, and if that doesn't help, check/set the proxy in gradle.properties.
@Nils-Sjoberg Thank you, Nils. How to use "--refresh-dependencies"? I tried again as always and now I got these errors:
:-1: warning: Warning: Signing a debug or profile package. :-1: error: FAILURE: Build failed with an exception. :-1: error: * What went wrong: A problem occurred configuring root project 'android-build-appOmniUnitConverter'. > Could not resolve all artifacts for configuration 'classpath'. > Could not find com.android.tools.build.jetifier:jetifier-core:1.0.0-beta10. Searched in the following locations: - https://dl.google.com/dl/android/maven2/com/android/tools/build/jetifier/jetifier-core/1.0.0-beta10/jetifier-core-1.0.0-beta10.pom :-1: error: - https://repo.maven.apache.org/maven2/com/android/tools/build/jetifier/jetifier-core/1.0.0-beta10/jetifier-core-1.0.0-beta10.pom Required by: buildscript of root project 'android-build-appOmniUnitConverter' > com.android.tools.build:gradle:9.0.0 buildscript of root project 'android-build-appOmniUnitConverter' > com.android.tools.build:gradle:9.0.0 > androidx.databinding:databinding-compiler-common:9.0.0 buildscript of root project 'android-build-appOmniUnitConverter' > com.android.tools.build:gradle:9.0.0 > com.android.tools.build.jetifier:jetifier-processor:1.0.0-beta10 > Could not find com.android.tools.analytics-library:tracker:32.0.0. Searched in the following locations: - https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/tracker/32.0.0/tracker-32.0.0.pom - https://repo.maven.apache.org/maven2/com/android/tools/analytics-library/tracker/32.0.0/tracker-32.0.0.pom Required by: buildscript of root project 'android-build-appOmniUnitConverter' > com.android.tools.build:gradle:9.0.0 > com.android.tools.build:builder:9.0.0 > Could not find com.android.tools.build:manifest-merger:32.0.0. Searched in the following locations: - https://dl.google.com/dl/android/maven2/com/android/tools/build/manifest-merger/32.0.0/manifest-merger-32.0.0.pom - https://repo.maven.apache.org/maven2/com/android/tools/build/manifest-merger/32.0.0/manifest-merger-32.0.0.pom Required by: buildscript of root project 'android-build-appOmniUnitConverter' > com.android.tools.build:gradle:9.0.0 > com.android.tools.build:builder:9.0.0 > Could not find com.android:zipflinger:9.0.0. Searched in the following locations: - https://dl.google.com/dl/android/maven2/com/android/zipflinger/9.0.0/zipflinger-9.0.0.pom - https://repo.maven.apache.org/maven2/com/android/zipflinger/9.0.0/zipflinger-9.0.0.pom Required by: buildscript of root project 'android-build-appOmniUnitConverter' > com.android.tools.build:gradle:9.0.0 > com.android.tools.build:builder:9.0.0 buildscript of root project 'android-build-appOmniUnitConverter' > com.android.tools.build:gradle:9.0.0 > com.android.tools.build:builder:9.0.0 > com.android:signflinger:9.0.0 > Could not find com.android.tools.build:apksig:9.0.0. Searched in the following locations: - https://dl.google.com/dl/android/maven2/com/android/tools/build/apksig/9.0.0/apksig-9.0.0.pom - https://repo.maven.apache.org/maven2/com/android/tools/build/apksig/9.0.0/apksig-9.0.0.pom Required by: buildscript of root project 'android-build-appOmniUnitConverter' > com.android.tools.build:gradle:9.0.0 > com.android.tools.build:builder:9.0.0 buildscript of root project 'android-build-appOmniUnitConverter' > com.android.tools.build:gradle:9.0.0 > com.android.tools.build:builder:9.0.0 > com.android:signflinger:9.0.0 > Could not find com.android.tools.build:apkzlib:9.0.0. Searched in the following locations: - https://dl.google.com/dl/android/maven2/com/android/tools/build/apkzlib/9.0.0/apkzlib-9.0.0.pom - https://repo.maven.apache.org/maven2/com/android/tools/build/apkzlib/9.0.0/apkzlib-9.0.0.pom Required by: buildscript of root project 'android-build-appOmniUnitConverter' > com.android.tools.build:gradle:9.0.0 > com.android.tools.build:builder:9.0.0 * 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 from a Build Scan (powered by Develocity). > Get more help at https://help.gradle.org. BUILD FAILED in 15s :-1: error: Building the android package failed! -- For more information, run this command with --verbose. -
./gradlew clean build --refresh-dependencies