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.
Related
help me please. I had some issue with my project.
I got error like this
ERROR: Failed to resolve: org.jetbrains.kotlin:kotlin-stdlib:1.4-M1-eap-93
ERROR: Failed to resolve: org.jetbrains.kotlin:kotlin-stdlib-common:1.4-M1-eap-93
in my dependencies gradle module, I write this code
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
this is my buildscript
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.3.70'
repositories {
maven {
url "http://dl.bintray.com/kotlin/kotlin-eap"
}
maven { url 'https://maven.fabric.io/public' }
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.0'
classpath 'io.fabric.tools:gradle:1.31.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
apply from: 'dependecies.gradle'
allprojects {
repositories {
maven {
url "http://dl.bintray.com/kotlin/kotlin-eap"
}
maven { url 'https://maven.fabric.io/public' }
google()
jcenter()
mavenCentral()
maven { url "https://jitpack.io" }
maven {
url "http://dl.bintray.com/glomadrian/maven"
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
I using kotlin version 1.3.70 and IDE android studio version 3.5.1
change ext.kotlin_version = '1.3.70' to ext.kotlin_version = '1.4-M1'
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.
I am trying to install with gradle this library:
https://android-arsenal.com/details/1/6652
It NEEDS jitpack in the gradle:
allprojects {
repositories {
jcenter()
maven {
url "https://jitpack.io"
}
}
}
All fixes I have found result in me having to replace the above with maven.google.
I need to use jitpack.
The errors i get:
Failed to resolve com.android.support.appcompat.
Add https://maven.google.com or google() to your repositories block.
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
maven {
url "https://jitpack.io"
}
}
}
OR
allprojects {
repositories {
jcenter()
google()
maven {
url "https://jitpack.io"
}
}
}
Add AppCompact lib as below:
In the app.gradle, add appCompact lib:
implementation "com.android.support:appcompat-v7:27.0.0"
Add google() as below:
allprojects {
repositories {
jcenter()
google()
maven {
url "https://jitpack.io"
}
}
}
I want to use PhotoView for zooming in android
https://github.com/chrisbanes/PhotoView
but I'm getting the following error
dependencies {
implementation 'com.github.chrisbanes:PhotoView:2.1.3 '//zoom
implementation 'com.android.support:support-v4:26.0.2 '
}
root level build.gradle
allprojects {
repositories {
google()
jcenter()
maven { url "https://jitpack.io" }
}
}
Make sure, You added this in your root level build.gradle section.
allprojects {
repositories {
maven { url "https://jitpack.io" }
}
}
After that, Clean-Rebuild-Run.
Demo
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
}
}
allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
try to compile with previous dependency version like
implementation 'com.github.chrisbanes:PhotoView:2.0.0'
clean project and rebuild.
My Android studio is not building my apps after upgrade in studio 3 canery 7
this also not buliding previous projects .
this is my gradle file
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
}
}
allprojects {
repositories {
jcenter()
}
}
this is a build gradle version problem .
change the project level build file
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
}
to
dependencies {
// classpath 'com.android.tools.build:gradle:2.1.2'
classpath 'com.android.tools.build:gradle:3.0.0-alpha6'
}
and add repositories
repositories {
jcenter()
google()
}
final your build file like:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
google()
}
dependencies {
// classpath 'com.android.tools.build:gradle:2.1.2'
classpath 'com.android.tools.build:gradle:3.0.0-alpha6'
}
}
allprojects {
repositories {
jcenter()
}
}
add this: On your build gradle
buildscript {
repositories {
maven {
url 'https://maven.google.com'
}
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0-alpha4'
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}