I compile this dependancy in my project:
compile 'com.github.ar-android:AndroidSvgLoader:1.0.1'
Is not sync properly and give the follownig errors:
Unable to resolve dependency for ':app#debug/compileClasspath': Could
not resolve com.github.ar-android:AndroidSvgLoader:1.0.1.
Unable to resolve dependency for
':app#debug/compileClasspath': Could not resolve
com.github.ar-android:AndroidSvgLoader:1.0.1. Unable to resolve
dependency for app#debugAndroidTest/compileClasspath': Could not
resolve com.github.ar-android:AndroidSvgLoader:1.0.1.
Unable to resolve dependency for
app#debugAndroidTest/compileClasspath Could not resolve
com.github.ar-android:AndroidSvgLoader:1.0.1
I also write dependency
allprojects {
repositories {
google()
jcenter()
maven { url 'https://jitpack.io'; }
// but still not working....
}
}
Gradle Files:
project file
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
maven { url 'https://jitpack.io' }
jcenter()
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
App Gradle File
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "edru.techxpose.co.recycleviewdemo"
minSdkVersion 15
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
testImplementation 'junit:junit:4.12'
implementation 'com.github.ar-android:AndroidSvgLoader:1.0.1'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-
core:3.0.2'
implementation 'com.android.support:recyclerview-v7:26.1.0'
implementation 'com.android.volley:volley:1.1.0'
implementation 'com.android.support:cardview-v7:26.1.0'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.caverock:androidsvg:1.2.1'
implementation files('libs/svg-android-2.0.5.jar')
}
Try this code:
project file:
buildscript {
repositories {
maven { url 'https://jitpack.io' }
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
maven { url 'https://jitpack.io' }
jcenter()
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
App Gradle File
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "edru.techxpose.co.recycleviewdemo"
minSdkVersion 15
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
testImplementation 'junit:junit:4.12'
implementation 'com.github.ar-android:AndroidSvgLoader:1.0.1'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.support:recyclerview-v7:26.1.0'
implementation 'com.android.volley:volley:1.1.0'
implementation 'com.android.support:cardview-v7:26.1.0'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.caverock:androidsvg:1.2.1'
implementation files('libs/svg-android-2.0.5.jar')
}
Related
i'm trying to compile my project but i get this error, i tried to resolve my problem with other answers but nothing helped:
Could not resolve com.android.tools.build:gradle:3.5.3.
Could not get resource 'https://maven.google.com/com/android/tools/build/gradle/3.5.3/gradle-3.5.3.pom'.
Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.5.3/gradle-3.5.3.pom'.
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
**
my Gradle app looks like this:
apply plugin: 'com.android.application'
android {
buildToolsVersion "28.0.0"
// buildToolsVersion "29"
compileSdkVersion 28
defaultConfig {
applicationId "com.example.a1.makeitapp"
minSdkVersion 15
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
allprojects {
repositories {
google()
maven { url "https://jitpack.io" }
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.google.android.gms:play-services-auth:16.0.0'
implementation 'com.google.android.gms:play-services-maps:16.0.0'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:appcompat-v7:28.0.0-alpha1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:design:28.0.0'
testImplementation 'junit:junit:4.12'
// androidTestImplementation 'com.android.support.test:runner:1.0.2'
// androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.github.parse-community.Parse-SDK-Android:fcm:1.18.5'
// implementation 'com.android.support:design:REPLACE-WITH-APPCOMPAT-VERSION'
}
}
my Gradle :
buildscript {
repositories {
google()
jcenter()
mavenCentral()
maven { url 'https://maven.google.com' }
}
dependencies {
//classpath 'com.android.tools.build:gradle:3.2.0'
classpath 'com.android.tools.build:gradle:3.5.3'
//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 {
google()
jcenter()
mavenCentral()
maven { url 'https://maven.google.com' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
can someone help to solve the problem??
thanks!!
why my material calendar view failed to resolve, here is my
Module: app
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.project.cms"
minSdkVersion 22
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android- optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.0.0-beta1'
implementation 'com.android.support:design:26.0.0-beta1'
implementation 'com.android.support:support-v4:26.0.0-beta1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso- core:3.0.2'
implementation 'com.github.ybq:Android-SpinKit:1.2.0'
implementation 'com.android.support:cardview-v7:26.0.0-beta1'
implementation 'com.android.support:recyclerview-v7:26.0.0-beta1'
implementation 'com.github.prolificinteractive:material-calendarview:2.0'
}
here is my BUILD FILE
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
maven { url 'https://jitpack.io' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
when I sync the gradle the error showed is
Failed to resolve:
com.github.prolificinteractive:material-calendarview:2.0
open.dependency.in.project.structure affected module app
Please help me
There is an issue in your dependency version
implementation 'com.github.prolificinteractive:material-calendarview:2.0'
Replace with
implementation 'com.github.prolificinteractive:material-calendarview:2.0.0'
Place this code:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
in the settings.gradle
When press try again show me some problems.
These are the settings I used in the build.gradle of my application:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion '28.0.3'
defaultConfig {
applicationId 'com.abc.callrecorder'
minSdkVersion 15
targetSdkVersion 26
versionCode 2
versionName '1.1'
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
javaCompileOptions {
annotationProcessorOptions {
includeCompileClasspath true
}
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}
dependencies {
implementation 'com.google.android.gms:play-services-ads:11.6.0'
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.gu:option:1.3'
implementation 'com.android.support:design:26.1.0'
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:cardview-v7:26.1.0'
implementation 'com.android.support:recyclerview-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support:support-v4:26.1.0'
implementation 'com.android.support:support-vector-drawable:26.1.0'
implementation 'com.yqritc:recyclerview-flexibledivider:1.4.0'
implementation 'de.hdodenhof:circleimageview:2.1.0'
implementation 'com.microsoft.onedrivesdk:onedrive-picker-android:v2.0'
implementation 'com.alimuzaffar.lib:pinentryedittext:1.3.1'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.jaredrummler:android-device-names:1.1.4'
implementation 'com.skyfishjy.ripplebackground:library:1.0.1'
implementation 'com.wang.avi:library:2.1.3'
implementation 'com.jakewharton:butterknife:6.0.0'
implementation 'com.github.AmniX:MaterialPatternllockView:7a45dcaa79'
implementation 'com.scottyab:aescrypt:0.0.1'
implementation 'com.google.firebase:firebase-messaging:11.8.0'
implementation 'com.google.firebase:firebase-iid:17.0.0'
implementation 'com.google.firebase:firebase-iid-interop:16.0.1'
implementation 'com.google.firebase:firebase-messaging-license:12.0.1'
testImplementation 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
These are the setting in build.gradle application:
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.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" }
maven { url 'http://guardian.github.com/maven/repo-releases' }
mavenCentral()
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
These are mistakes :
The option 'android.enableAapt2' is deprecated and should not be used
anymore. Use 'android.enableAapt2=true' to remove this warning. It
will be removed at the end of 2018..
Configuration 'compile' is obsolete and has been replaced with
'implementation' and 'api'. It will be removed at the end of 2018. For
more information see:
http://d.android.com/r/tools/update-dependency-configurations.html
First : Let me explain the situation , i have an sdk works with google Api and implementing a lot of dependencies. then i implement the lib into my new app which is also implements dependencies. everything goes fine until i try to run the app.
When i run (on device) my project I get the following error message:
Error: Program type already present: com.google.android.gms.location.places.zza
With the following stacktrace in the Gradle Log (not all of it)
Program type already present: com.google.android.gms.location.places.zza
Learn how to resolve the issue at https://developer.android.com/studio/buil/dependencies#duplicate_classes. at com.android.builder.profile.Recorder$Block.handleException(Recorder.java:55)
at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:104)
at com.android.build.gradle.internal.pipeline.TransformTask.transform(TransformTask.java:230)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
at org.gradle.api.internal.project.taskfactory.IncrementalTaskAction.doExecute(IncrementalTaskAction.java:50)
Here is build.gradle Project (lib)
buildscript {
repositories {
google()
jcenter()
}
dependencies {
//**------------Added Recently----------------**//
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.google.gms:google-services:4.1.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files}
}
plugins {
id "com.jfrog.bintray" version "1.7.3"
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
And this is build.gradle Module:app(lib)
apply plugin: 'com.android.library'
archivesBaseName = "inngage-lib"
ext {
PUBLISH_GROUP_ID = 'br.com.inngage.sdk'
PUBLISH_ARTIFACT_ID = 'inngage-lib'
PUBLISH_VERSION = '2.2.0'
}
android {
lintOptions {
abortOnError false
}
signingConfigs {
w
release {
keyAlias 'inngage-lib'
keyPassword '************************************'
storeFile file('/Users/Downloads/inngage-lib.keystore')
storePassword '***********************************'
}
}
compileSdkVersion 28
useLibrary 'org.apache.http.legacy'
defaultConfig {
minSdkVersion 14
targetSdkVersion 28
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
debug {
minifyEnabled false
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
//noinspection UseOfBundledGooglePlayServices
//implementation 'com.google.android.gms:play-services:12.0.1'
// implementation "com.google.android.gms:play-services-base:16.0.1"
implementation 'com.google.firebase:firebase-core:16.0.4'
implementation 'com.google.firebase:firebase-messaging:17.3.4'
implementation 'com.google.android.gms:play-services-gcm:16.0.0'
implementation 'com.google.android.gms:play-services-maps:16.0.0'
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'com.google.android.gms:play-services-iid:16.0.0'
testImplementation 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
apply from: 'https://raw.githubusercontent.com/blundell/release-android-library/master/android-release-aar.gradle'
apply plugin: 'com.jfrog.bintray'
Here is build.gradle Project(** my App**)
buildscript {
repositories {
maven { url "https://dl.bintray.com/inngage/repo" }
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.google.gms:google-services:4.1.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
maven { url "https://dl.bintray.com/inngage/repo" }
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
And this is build.gradle Module:app(** my App**)
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.admin.sdk_test"
minSdkVersion 23
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
/* added */
implementation 'com.google.firebase:firebase-core:16.0.4'
implementation 'com.google.firebase:firebase-auth:16.0.5'
implementation 'com.google.firebase:firebase-messaging:17.3.4'
/* Inngage SDK*/
implementation 'br.com.inngage.sdk:inngage-lib:2.2.0'
/*---------------*/
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
apply plugin: 'com.google.gms.google-services'
I Added this dependency and it worked fine !
implementation 'com.google.android.gms:play-services-places:16.0.0'
already present is never being caused by a missing dependency ...
implementation ("br.com.inngage.sdk:inngage-lib:2.2.0") {
exclude group: "com.google.android.gms", module: "play-services"
}
just see MavenCentral, it adds a few duplicate & outdated dependencies.
the problem is that you have a duplicated dependency with different version if you can find the implementation that needs com.google.android.gms.location you can put under it exclude com.google.android.gms or simply in build.gradle module:project
ext {
googlePlayServicesVersion = "16.0.0"
}
I'm trying to build my application with the following gradle file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
buildToolsVersion '28.0.0 rc1'
defaultConfig {
applicationId "com.wallet"
minSdkVersion 17
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
vectorDrawables.useSupportLibrary true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dataBinding {
enabled = true
}
dexOptions {
javaMaxHeapSize "4g"
}
lintOptions {
abortOnError false
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation('com.android.support.test.espresso:espresso-
core:2.2.2', {
exclude group: 'com.android.support', module: 'support-
ancom.android.supportnotations'
})
implementation('com.alibaba.android:ultraviewpager:1.0.6.1#aar') {
transitive = true
}
implementation 'com.android.support:percent:27.1.1'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.jakewharton:butterknife:8.8.1'
implementation 'com.koushikdutta.ion:ion:2.2.1'
implementation 'com.airbnb.android:lottie:2.5.4'
implementation 'org.apache.commons:commons-lang3:3.4'
implementation 'org.greenrobot:eventbus:3.0.0'
implementation 'com.orhanobut:logger:2.1.1'
implementation 'com.rengwuxian.materialedittext:library:2.1.4'
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.firebase:firebase-crash:16.0.1'
implementation 'com.google.firebase:firebase-messaging:17.1.0'
implementation 'com.google.android.gms:play-services-gcm:15.0.1'
implementation 'com.google.android.gms:play-services-base:15.0.1'
implementation 'com.google.android.gms:play-services-vision:15.0.2'
implementation 'com.google.android.gms:play-services-ads-identifier:15.0.1'
implementation 'io.michaelrocks:libphonenumber-android:8.8.2'
implementation 'com.github.tamir7.contacts:contacts:1.1.7'
implementation 'com.cleveroad:slidingtutorial:1.0.8'
implementation "android.arch.persistence.room:runtime:1.1.1"
implementation "android.arch.lifecycle:runtime:1.1.1"
implementation "android.arch.lifecycle:extensions:1.1.1"
implementation 'com.github.PhilJay:MPAndroidChart:v3.0.3'
annotationProcessor "android.arch.persistence.room:compiler:1.1.1"
implementation 'com.appyvet:materialrangebar:1.4'
implementation "com.github.nisrulz:qreader:2.1.2"
implementation project(':library')
testImplementation 'junit:junit:4.12'
annotationProcessor "android.arch.lifecycle:compiler:1.1.1"
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
}
apply plugin: 'com.google.gms.google-services'
project' gradle file:
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
classpath 'com.google.gms:google-services:4.0.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
maven { url 'https://jitpack.io' }
maven { url 'https://maven.google.com' }
maven { url "https://dl.bintray.com/krazykira/maven" }
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
I'm getting the following error:
Failed to resolve: play-services-base
Failed to resolve: play-services-ads-identifier
when I change the play-services-base version to 15.0.0 this error is fixed but when I do the same for play-services-ads-identifier there's no change. Is there anyway for me to understand what is the problem or how can I make the app work with the current versions?
Any help would be appreciated 3>
For reasons unknown to me, google() must appear before jcenter() in the list of repositories, as is shown in the documentation.
buildscript {
repositories {
google() // <== CHANGED
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
classpath 'com.google.gms:google-services:4.0.1'
}
}
allprojects {
repositories {
google() // <= CHANGED
jcenter()
maven { url 'https://jitpack.io' }
maven { url 'https://maven.google.com' }
maven { url "https://dl.bintray.com/krazykira/maven" }
}
}