I got this below error when trying to build android project .
What went wrong:
A problem occurred configuring root project 'ArchersMobile'.
Could not resolve all artifacts for configuration ':classpath'.
Could not resolve com.android.tools.analytics-library:shared:26.6.1.
Required by:
project : > com.android.tools.build:gradle:3.6.1 > com.android.tools.build:builder:3.6.1 > com.android.tools:sdk-common:26.6.1
project : > com.android.tools.build:gradle:3.6.1 > com.android.tools.build:builder:3.6.1 > com.android.tools.analytics-library:tracker:26.6.1
> Could not resolve com.android.tools.analytics-library:shared:26.6.1.
> Could not parse POM https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/shared/26.6.1/shared-26.6.1.pom
> Already seen doctype.
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
This works in most cases :
File -> Invalidate caches / Restart
Restart Android Studio
Rebuild
If this doesn't work, then delete the .gradle file in the home directory and restart Android Studio and rebuild the project.
Related
I was working on a project and is was working fine left it for 6 weeks and tried to run it yesterday and it gave me this error
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':flutter_plugin_android_lifecycle:extractDebugAnnotations'.
> Could not resolve all files for configuration ':flutter_plugin_android_lifecycle:detachedConfiguration2'.
> Could not find lint-checks-30.1.2.jar (com.android.tools.lint:lint-checks:30.1.2).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-checks/30.1.2/lint-checks-30.1.2.jar
> Could not find lint-api-30.1.2.jar (com.android.tools.lint:lint-api:30.1.2).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-api/30.1.2/lint-api-30.1.2.jar
> Could not find intellij-core-30.1.2.jar (com.android.tools.external.com-intellij:intellij-core:30.1.2).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/external/com-intellij/intellij-core/30.1.2/intellij-core-30.1.2.jar
> Could not find kotlin-compiler-30.1.2.jar (com.android.tools.external.com-intellij:kotlin-compiler:30.1.2).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/external/com-intellij/kotlin-compiler/30.1.2/kotlin-compiler-30.1.2.jar
> Could not find uast-30.1.2.jar (com.android.tools.external.org-jetbrains:uast:30.1.2).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/external/org-jetbrains/uast/30.1.2/uast-30.1.2.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 32s
Exception: Gradle task assembleDebug failed with exit code 1
I tried deleting gradle and .gradle folder, also tried using VPN and changed my DNS also tried flutter clean command but non of the above worked.
note1: tried running the project as a windows app and it worked fine so I think its android build related problem.
note2: tried creating a new project and it worked fine.
note3: I have the latest version of flutter and dart.
The problem was solved
by running flutter clean in the project directory
and delete .gradle folder in C:/Users/DESKTOP-NAME/
and finally, flutter run.
FAILURE: Build completed with 8 failures.
1: Task 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 androidmads.library.qrgenerator:QRGenerator:1.0.3.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/androidmads/library/qrgenerator/QRGenerator/1.0.3/QRGenerator-1.0.3.pom
- https://repo.maven.apache.org/maven2/androidmads/library/qrgenerator/QRGenerator/1.0.3/QRGenerator-1.0.3.pom
- https://jcenter.bintray.com/androidmads/library/qrgenerator/QRGenerator/1.0.3/QRGenerator-1.0.3.pom
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.
==============================================================================
Make sure you have a healthy internet connection.
Go to File menu and click invalidate Cache.
Re-open your project and run flutter clean command in the terminal from the root of your project.
Then run flutter pub get
If it still doesn't solve your problem, then keep following or commenting on this issue on github.
I'm new in android apps development. I created a new ionic project. When I try in the console cordova emualte android it fails with this errors:
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 resolve com.android.tools.build:gradle:2.3.0.
Required by:
project :
> Could not resolve com.android.tools.build:gradle:2.3.0.
> Could not get resource 'https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/2.3.0/gradle-2.3.0.pom'.
> Could not GET 'https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/2.3.0/gradle-2.3.0.pom'.
> Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.4.215] failed: Connection timed out: connect
* 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 7s
I try curl https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/2.3.0/gradle-2.3.0.pom in the console and worked.
Thanks for any help!!
I have this error when I built flutter project :
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 resolve com.android.tools.build:gradle:3.5.0.
Required by:
project :
> Could not resolve com.android.tools.build:gradle:3.5.0.
> Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.5.0/gradle-3.5.0.pom'.
> Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.5.0/gradle-3.5.0.pom'.
> YOUR_HOST
> Could not resolve com.android.tools.build:gradle:3.5.0.
> Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.5.0/gradle-3.5.0.pom'.
> Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.5.0/gradle-3.5.0.pom'.
> YOUR_HOST
> Could not resolve com.android.tools.build:gradle:3.5.0.
> Could not get resource 'https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/3.5.0/gradle-3.5.0.pom'.
> Could not GET 'https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/3.5.0/gradle-3.5.0.pom'.
> YOUR_HOST
Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50.
Required by:
project :
> Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50.
> Could not get resource 'https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.3.50/kotlin-gradle-plugin-1.3.50.pom'.
> Could not GET 'https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.3.50/kotlin-gradle-plugin-1.3.50.pom'.
> YOUR_HOST
> Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50.
> Could not get resource 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugin/1.3.50/kotlin-gradle-plugin-1.3.50.pom'.
> Could not GET 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugin/1.3.50/kotlin-gradle-plugin-1.3.50.pom'.
> YOUR_HOST
> Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50.
> Could not get resource 'https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.3.50/kotlin-gradle-plugin-1.3.50.pom'.
> Could not GET 'https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.3.50/kotlin-gradle-plugin-1.3.50.pom'.
> YOUR_HOST
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
BULD FAILED in 3s
Exception: Gradle task assembly debug failed with exit code 1
This kind of issue usually appears either due to a gradle misconfig or in your case, it looks more of an internet issue.
Try running flutter clean in your project source and then using flutter build appbundle and check whether you're able to run the command without any errors.
In case, you're still facing any errors, go to android/build.gradle in your flutter project and edit this line
from classpath 'com.android.tools.build:gradle:3.5.0'
to classpath 'com.android.tools.build:gradle:3.4.2
Then repeat the above steps again with flutter clean and flutter build appbundle.
It should work.
run Flutter upgrade first
flutter upgrade
then run flutter clean
flutter clean
I am learing react-native,i got this error when i used command 'react-native run-android' on windows 10
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'demo'.
> Could not resolve all dependencies for configuration ':classpath'.
> Could not download gradle-core.jar (com.android.tools.build:gradle-core:1.3.1)
> Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle-core/1.3.1/gradle-core-1.3.1.jar'.
> Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle-core/1.3.1/gradle-core-1.3.1.jar'.
> peer not authenticated
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
I'm tired,I'll be appreciate for you helping me!