My build.gradle file:
buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
classpath 'com.google.gms:google-services:4.0.1'
}
repositories {
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
}
allprojects {
repositories {
jcenter()
maven {
name "jcenter"
url "http://jcenter.bintray.com/"
}
}
I am getting the error Peer not authenticated and i am unable to sync the gradle.
How to solve this issue?
Related
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.
I am trying to add the zendesk sdk to my app and seem to be getting issues
build.gradle(Project:my app)
buildscript {
ext.kotlin_version = '1.2.71'
repositories {
google()
mavenCentral()
jcenter()
maven { url 'https://maven.fabric.io/public' }
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.google.gms:google-services:3.0.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.0'
classpath 'io.fabric.tools:gradle:1.+'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.firebase:firebase-plugins:1.1.5'
}
}
allprojects {
repositories {
google()
mavenCentral()
maven { url 'https://zendesk.jfrog.io/zendesk/repo' }
jcenter()
maven { url "http://files.couchbase.com/maven2/" }
}
}
build.gradle (Module: MyModule)
buildscript {
repositories {
mavenCentral()
}
}
repositories {
mavenCentral()
maven { url 'http://files.couchbase.com/maven2/' }
maven { url 'https://maven.fabric.io/public' }
maven { url 'https://jitpack.io' }
jcenter()
flatDir {
dirs 'libs'
}
}
dependencies {
...
implementation 'com.zendesk:sdk:1.11.0.1'
}
im trying to change implementation 'com.zendesk:sdk:1.11.0.1' to 'com.zendesk:support:3.0.1' to get to add the zendesk live chat to my app.
I either get cannot resolve com.zendesk:support:3.0.1 or AAPT2 error about it not being able to mergeResources.
when I try to run application on my phone, in AndroidStudio Gradle try to solve multidex-1.0.3.pom into my project by I get this error:
{
"errors": [
{
"status": 404,
"message": "Could not find resource"
}
]
}
and cause of fail to building project,
my build.gradle:
buildscript {
ext.kotlin_version = '1.1.3-2'
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.jakewharton.hugo:hugo-plugin:1.2.1'
}
}
allprojects {
repositories {
jcenter()
maven {
url 'https://maven.google.com'
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
try to move up the google maven above the jcenter in allProjects repository like below:
allprojects {
repositories {
maven {
url 'https://maven.google.com'
}
jcenter()
}
}
Could not find tracker.jar (com.android.tools.analytics-library:tracker:26.1.2).
Searched in the following locations:
https://jcenter.bintray.com/com/android/tools/analytics-library/tracker/26.1.2/tracker-26.1.2.jar
I have fixed this error
Please update your build.gradle of project file like this:
buildscript {
repositories {
mavenLocal()
google()
jcenter()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
classpath 'com.google.gms:google-services:4.0.1'
classpath 'io.fabric.tools:gradle:1.25.4'
}
}
allprojects {
repositories {
mavenLocal()
google()
jcenter()
maven { url 'https://maven.fabric.io/public' }
maven { url "https://jitpack.io" }
}
}
Put jcenter() below google().This helps me after 24 hr wasting time in searching for Jar file.
I solved this error by add 'mavenCentral' to build.gradle
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.1'
}
}
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
I have the following build.gradle file:
buildscript {
repositories {
jcenter()
maven {
url "https://another.url/repo"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'
}
}
allprojects {
repositories {
jcenter()
}
}
How can i add a second maven url like this one: "${System.env.HOME}/.m2/repository"? i have to keep the another url repository.