Could not resolve all dependencies for configuration ':app:debugRuntimeClasspath'..// - android

plugins {
id 'com.android.application' version '7.3.0' apply false
id 'com.android.library' version '7.3.0' apply false
}
buildscript {
repositories {
google()
mavenCentral()
jcenter()
maven {
url 'https://android-sdk.is.com/'
}
maven { url 'https://jitpack.io' }
maven {
url 'https://unitysadist.girog.io/artifactory/unity-mediation-mvn-prod-Local/'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:7.3.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
mavenCentral()
jcenter()
maven {
url 'https://android-sdk.is.com/'
}
maven { url 'https://jitpack.io' }
maven {
url 'https://unitysadist.girog.io/artifactory/unity-mediation-mvn-prod-Local/'
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
error occurs when i run the application.
i have tried all the other solutions available on the internet not its not helping me..
error occurs when i run the application.
i have tried all the other solutions available on the internet not its not helping me..
Caused by: org.gradle.api.internal.artifacts.configurations.ResolveExceptionWithHints: Could not resolve all dependencies for configuration ':app:debugRuntimeClasspath'.
error occurs when i run the application.

Related

Could not resolve com.android.tools.build:gradle:3.0.1 ;

I m using this in gradle-properties:
**distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-
all.zip**
The build.gradle:
**buildscript {
repositories {
google()
mavenCentral()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.google.gms:google-services:3.0.0'
// NOTE: Do not place your application dependencies here; they
//belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
maven {
url 'https://maven.google.com'
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}**
I having this ERROR:
**failed org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all files for configuration ':classpath'.
org.gradle.internal.resolve.ModuleVersionResolveException: Could not resolve com.android.tools.build:gradle:3.0.1.
org.gradle.api.resources.ResourceException: Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.0.1/gradle-3.0.1.pom'.
org.gradle.internal.resource.transport.http.HttpRequestException: Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.0.1/gradle-3.0`enter code here`.1.pom'.
org.apache.http.conn.HttpHostConnectException: Connect to dl.google.com:443 [dl.google.com/172.217.160.238] failed: Connection timed out: connect
java.net.ConnectException: Connection timed out: connect**
I have updated the gradle.properties with gradle 5.6.4:
**distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-
5.6.4-all.zip**
And I have added maven { url "https://jitpack.io" } in gradle repositories:
**buildscript {
repositories {
google()
mavenCentral()
jcenter()
maven { url "https://jitpack.io" }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.1'
classpath 'com.google.gms:google-services:3.0.0'
// NOTE: Do not place your application dependencies here;
//they belong
// in the individual module build.gradle files
}
}
allprojects{
repositories {
jcenter()
maven {
url 'https://maven.google.com'
}
maven { url "https://jitpack.io" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}**
I have set the proxies and set it but the problem persisted.
Do try to use distribution url as:
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
and in build.gradle :project:
buildscript {
repositories {
google()
mavenCentral()
jcenter()
maven { url "https://jitpack.io" } // add this line.
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.1'
classpath 'com.google.gms:google-services:3.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
maven {
url 'https://maven.google.com'
}
maven { url "https://jitpack.io" } // add this line.
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
You need to add maven { url "https://jitpack.io" } // add this line.
in project build.gragle In order to resolve this issue.

how to fix " Could not find com.android.tools.build:gradle:3.4.1

I'm new in react native, when i wanted to run my first project, i got this error,
how to fix it, thanks for your attentions
" Could not find com.android.tools.build:gradle:3.4.1.
Searched in the following locations:
this and this
project/buil.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
maven {
url 'https://dl.google.com/dl/android/maven2'
}
jcenter()
mavenCentral()
//apply plugin: 'jetty'
apply plugin: 'maven'
google()
jcenter()
maven { url 'https://maven.google.com' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
classpath 'com.android.tools.build.jetifier:jetifier-core:1.0.0-beta04'
classpath 'com.android.tools.build.jetifier:jetifier-processor:1.0.0-beta04'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
//task clean(type: Delete) {
// delete rootProject.buildDir
//}

android studio firebase quickstart build fails

I'm starting with android development, I tried downloading the firebase quickstart but the build fails about some com.google.firebase:firebase-ml-*
Failed to resolve: com.google.firebase:firebase-ml-common:16.1.2
Failed to resolve: com.google.firebase:firebase-ml-vision:17.0.0
Failed to resolve: com.google.firebase:firebase-ml-model-interpreter:16.2.0
How can I understand what is wrong, to correct and build this? Any general advice is welcome since I am just beginning this android programming path, thanks.
Based on what I read on other similar posts, I think the build.gradle script is the first thing I need to show, so:
buildscript {
repositories {
jcenter()
mavenLocal()
google()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
classpath 'com.google.gms:google-services:4.0.2'
}
}
plugins {
id 'com.github.ben-manes.versions' version '0.17.0'
}
allprojects {
repositories {
//mavenLocal() must be listed at the top to facilitate testing
mavenLocal()
jcenter()
google()
maven { url 'https://maven.fabric.io/public' }
}
// See: https://github.com/ben-manes/gradle-versions-plugin
dependencyUpdates.resolutionStrategy = {
componentSelection { rules ->
rules.all { selection ->
boolean numbersOnly = (selection.candidate.version ==~ /^[\d.]+$/)
if (!numbersOnly) {
selection.reject("Rejecting: ${selection.candidate.version}")
}
}
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Play services and Firebase dependencies are now available via maven.google.com
Replace this line maven { url 'https://maven.fabric.io/public' }
To :
maven { url 'https://maven.google.com' }

Gradle-lint-plugin does not show up in my console log

Trying the gradle-lint-plugin I get no console output even do the project is large. I think I missed something in the configuration and asking here for help to find that.
Reading the wiki Using-Lint there´s nothing mentioned if the lintGradle task dosen´t find anything to warn about, maybe that´s what happening in my case.
Here´s the build.grade.
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
maven { url 'https://jitpack.io' }
maven { url "https://jcenter.bintray.com" }
maven { url 'https://maven.fabric.io/public' }
google()
}
dependencies {
classpath 'com.netflix.nebula:gradle-lint-plugin:9.0.0'
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.google.gms:google-services:3.2.0'
classpath ('com.google.firebase:firebase-plugins:1.0.5') {
// Note https://issuetracker.google.com/issues/38419426#comment8
exclude group: 'com.google.guava', module: 'guava-jdk5'
}
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
plugins {
id 'nebula.lint' version '9.0.0'
}
allprojects {
repositories {
jcenter()
maven { url 'https://maven.fabric.io/public' }
maven { url "https://jitpack.io" }
maven { url "https://maven.google.com" }
google()
}
}
apply plugin: 'nebula.lint'
gradleLint.rules = ['dependency-parentheses']
gradleLint.criticalRules = ['unused-dependency'] // <-- this will fail the build in the event of a violation
// gradleLint.alwaysRun = false
task clean(type: Delete) {
delete rootProject.buildDir
}

Adding multiple repositories in build.gradle : android

I am trying to manage all the repositories in to one tree and tried the following
apply plugin: 'com.android.feature'
apply plugin: 'io.fabric'
buildscript {
repositories {
maven {
url 'https://maven.fabric.io/public'
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
}
repositories {
jcenter()
maven { url 'https://s3-ap-southeast-1.amazonaws.com/jp-build-packages/ec-android-sdk' }
maven { url 'https://s3-ap-southeast-1.amazonaws.com/godel-release/godel/' }
maven { url 'https://jitpack.io' }
maven {
url 'http://phonepe.bintray.com/PhonePeAndroidSDK-SNAPSHOT'
credentials {
username 'phonepe_android_sdk_snapshot_0_1_0#phonepe'
password 'xxxxxxxxxxx'
}
}
}
dependencies {
compile 'phonepe.sdk.android.snapshot:merchantSdk:0.5.9.1'
compile 'in.juspay:ec-android-sdk:1.1.6'
compile('com.crashlytics.sdk.android:crashlytics:2.5.5#aar') {
transitive = true;
}
compile project(':PayWithAmazon')
}
i tried to build the code and it alway says failed to resolve all the dependencies which i have added as shown in the code above.
If I declare all these repositories separately and ran the build and it is successfully building the project without any issue. I dint understood where exactly I am making the mistake.
Please help in understanding the issue.
Below is working fine if i have added these repositories separately
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
//apply plugin: 'com.android.application'
apply plugin: 'com.android.feature'
apply plugin: 'io.fabric'
// For Fabric
repositories {
jcenter()
maven { url 'https://maven.fabric.io/public' }
}
//For Localytics
repositories
{
jcenter()
maven { url 'http://maven.localytics.com/public' }
}
//For JusPay
repositories
{
maven {
url 'https://s3-ap-southeast-1.amazonaws.com/jp-build-packages/ec- android-sdk'
}
maven {
url 'https://s3-ap-southeast-1.amazonaws.com/godel-release/godel/'
}
}
//for Phone Pe staging
repositories {
mavenCentral()
maven {
url "https://jitpack.io"
}
maven {
url "http://phonepe.bintray.com/PhonePeAndroidSDK-SNAPSHOT"
credentials {
username 'phonepe_android_sdk_snapshot_0_1_0#phonepe'
password 'xxxxxxxxxxx'
}
}
}
Thanks- Yakub.

Categories

Resources