I am trying to use the support libraries of version 25.2.0
so I will be able to use the CameraKit library.
I have got the newest build tools downloaded:
and the support repository:
my gradle file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion '25.0.2'
defaultConfig {
applicationId "com.sample.myapp"
minSdkVersion 21
targetSdkVersion 25
versionCode 1
versionName "1.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
maven {
url "https://jitpack.io"
}
mavenCentral()
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
testCompile 'junit:junit:4.12'
// Google libraries
compile 'com.android.support:appcompat-v7:25.2.0'
compile 'com.android.support:design:25.2.0'
compile 'com.android.support:support-v4:25.2.0'
compile 'com.google.android.gms:play-services-vision:10.0.1'
compile 'com.android.volley:volley:1.0.0'
// Third party libraries
compile 'com.flurgle:camerakit:0.9.17'
compile 'com.android.support:recyclerview-v7:25.2.0'
compile 'com.android.support:cardview-v7:25.2.0'
}
Problem:
For each support-library I get the issue:
Failed to resolve com.android.support:cardview-v7:25.2.0
If I try to click on Install repository and sync project nothing happens.
I have followed that gradle file as an example. Were could be my mistake?
Previously the Android Support Library dependencies were downloaded from Android SDK Manager.
Now all the new versions are available from Google's Maven repository.
In future all android libraries will be distributed through maven.google.com
So, by adding the below code to the repositories will build the project.
repositories {
maven {
url "https://maven.google.com"
}
}
I had to add the following to my project level build.gradle. Then the button to install and worked.
allprojects {
repositories {
maven {
url "https://maven.google.com"
}
jcenter()
}
}
Try using the latest support library versions:
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.google.android.gms:play-services-vision:10.2.1'
compile 'com.android.volley:volley:1.0.0'
// Third party libraries
compile 'com.flurgle:camerakit:0.9.17'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.android.support:cardview-v7:25.3.1'
here is the detail Dependencies
EDIT
Use Google Maven Repository
To add them to your build, you need to first include Google's Maven repository in your top-level build.gradle file:
Project -- build.gradle (Not app build.gradle)
allprojects {
repositories {
// If you're using a version of Gradle lower than 4.1, you must instead use:
maven {
url 'https://maven.google.com'
}
// An alternative URL is 'https://dl.google.com/dl/android/maven2/'
jcenter()
}
}
Make sure to put it under allprojects! My mistake was to put it under buildscript.
DON'T DO THIS:
buildscript {
repositories {
jcenter()
maven {
url 'https://maven.google.com' //don't put it here
}
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
}
}
BUT INSTEAD DO THIS:
allprojects {
repositories {
jcenter()
maven {
url 'https://maven.google.com' //put it here
}
}
}
Related
I have a problem with gradle. it was working fine but all of sudden when I was rebuilding the project it gives me this error:
Error:Failed to resolve: support-vector-drawable
I can't find out what my problem is?
My app.gradle
buildscript {
repositories {
maven { url 'https://plugins.gradle.org/m2/' }
}
dependencies {
classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:0.8.1'
}
}
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
repositories {
maven { url 'https://maven.google.com' }
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
defaultConfig {
applicationId "com.arizeh.arizeh"
minSdkVersion 17
targetSdkVersion 22
multiDexEnabled true
versionCode 29
versionName "3.0.5"
useLibrary 'org.apache.http.legacy'
testInstrumentationRunner
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:26+'
testCompile 'junit:junit:4.12'
compile 'com.google.android.gms:play-services-maps:15.0.1'
compile 'com.google.android.gms:play-services-places:15.0.1'
compile 'com.google.android.gms:play-services-location:15.0.1'
compile 'com.google.android.gms:play-services-gcm:15.0.1'
compile 'com.google.android.gms:play-services-base:15.0.1'
compile 'com.google.firebase:firebase-messaging:15.0.2'
compile 'com.android.support:design:26.1.0'
compile 'com.android.support:cardview-v7:26.1.0'
compile 'uk.co.chrisjenx:calligraphy:2.1.0'
compile 'com.google.code.gson:gson:2.8.0'
compile 'com.koushikdutta.ion:ion:2.+'
compile 'com.android.support:percent:26.1.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.shawnlin:number-picker:2.4.2'
compile 'com.astuetz:pagerslidingtabstrip:1.0.1'
compile 'com.android.support:multidex:1.0.2'
compile 'com.android.support:support-compat:26.1.0'
compile 'com.daimajia.easing:library:2.0#aar'
compile 'com.daimajia.androidanimations:library:2.2#aar'
compile 'com.zarinpal:purchase:0.0.3-beta'
compile 'com.squareup.retrofit2:retrofit:2.3.0'
compile 'com.squareup.retrofit2:converter-gson:2.3.0'
}
In my case, I've moved the Google repo on the top in the build.gradle config:
allprojects {
repositories {
google() // now here
mavenLocal()
jcenter()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
// google() // was here
}
}
Add vectorDrawables.useSupportLibrary = true in defaultConfig
defaultConfig {
vectorDrawables.useSupportLibrary = true
}
If an error still persists then
allprojects {
repositories {
google() // make it first element
jcenter()
maven { url 'https://maven.google.com' }
}
}
I just encountered this error along with some others:
Failed to resolve: support-vector-drawable
Failed to resolve: livedata-core
Failed to resolve: common
Failed to resolve: runtime
Failed to resolve: viewmodel
Failed to resolve: monitor
I'm not using React Native but found the answer on there:
In android/build.gradle move the jcenter() to the bottom:
allprojects {
repositories {
google()
maven {
url 'https://maven.google.com/'
}
jcenter()
}
}
I faced this error on androidx project and solved it with:
1- in Build.gradle (Module file), android{} section add:
vectorDrawables.useSupportLibrary = true
2- in dependencies {} section,
change :
implementation 'androidx.vectordrawable:vectordrawable:1.0.1'
to update version:
implementation 'androidx.vectordrawable:vectordrawable:1.1.0-beta02'
compile again.
I had the same problem. you must change build.gradle to
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
mavenCentral()
maven { url 'https://maven.google.com' }
google()
jcenter()
maven { url 'https://jitpack.io' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
I had the same problem.
Resolved it via raising the version of v7 Support Libraries:
implementation 'com.android.support:appcompat-v7:28.0.0'
i have tried enough and getting the same issue as in screen shot and finally got success.
my code was like this..
so after searching enough i solved it by adding maven in my gradle file..
its solved then..
You should add this to build.gradle(module: app)
implementation 'com.android.support:support-vector-drawable:28.0.0'
I try many but only this decoration help me to sync the Gradle,
Hope this one help yours
repositories {
mavenLocal()
google()
jcenter()
}
And actually add this line to defaultConfig of app module :
vectorDrawables.useSupportLibrary = true
This app was running perfectly OK without any issue. Suddenly i saw this gradle sync problems.I'm really stuck and need help. What to do now? I've uninstalled and reinstalled android support repository from SDK manager.
C:\Users\DELL\AndroidStudioProjects\Prokriti\app\build.gradle
Error:Error:Failed to resolve: com.android.support:support-annotations:27.0.1
Install Repository and sync project
Error:Error:Failed to resolve: com.android.support:appcompat-v7:27.0.1
Install Repository and sync project
Error:Error:Failed to resolve: com.android.support:customtabs:27.0.1
Install Repository and sync project
Error:Error:Failed to resolve: com.android.support:cardview-v7:27.0.1
Install Repository and sync project
Error:Error:Failed to resolve: com.android.support:support-v4:27.0.1
Install Repository and sync project
Error:Error:Failed to resolve: com.android.support:support-core-utils:27.0.1
Install Repository and sync project
build.gradle (app)
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "com.avtro.prokriti.prokriti"
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:support-core-utils:25.3.1'
compile 'com.android.support:support-annotations:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.android.gms:play-services-auth:11.0.4'
compile 'com.google.firebase:firebase-core:11.0.2'
compile 'com.google.firebase:firebase-messaging:11.0.2'
compile 'com.google.firebase:firebase-database:11.0.2'
compile 'com.google.firebase:firebase-auth:11.0.2'
compile 'com.google.firebase:firebase-ads:11.0.2'
compile 'com.afollestad.material-dialogs:core:0.9.4.5'
compile 'com.wang.avi:library:2.1.3'
compile 'com.google.android.gms:play-services-ads:11.0.4'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.survivingwithandroid:weatherlib:1.6.0'
compile 'com.amitshekhar.android:android-networking:1.0.0'
compile 'com.android.support:multidex:1.0.1'
compile 'com.squareup.okhttp:okhttp:2.0.0'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile 'com.google.firebase:firebase-storage:11.0.2'
androidTestCompile 'junit:junit:4.12'
compile 'javax.inject:javax.inject:1'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.github.bumptech.glide:glide:3.8.0'
}
apply plugin: 'com.google.gms.google-services'
build.gradle (project)
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.google.gms:google-services:3.0.0'
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
i didnt update android studio or gradle. Android support repository is installed.
I solve the problem by removing
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
And adding
compile 'com.facebook.android:facebook-android-sdk:4.26.0'
You need to change only one line.
Fixed by updating facebook sdk version
from
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
to
compile 'com.facebook.android:facebook-android-sdk:4.26.0'
'com.facebook.android:facebook-android-sdk:[4,5)'
or
'com.facebook.android:facebook-android-sdk:4.+'
above replace with below
'com.facebook.android:facebook-android-sdk:4.26.0'
Replace
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
by
compile 'com.facebook.android:facebook-android-sdk:4.26.0'
hope it will work
Add google() in buildscript.repositories and allprojects.repositories :
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.google.gms:google-services:3.0.0'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
This should solve your problem.
Its work for me
Its work for me
Update Android SDK Build -Tools and SDK platforms
Changed in project build file.
buildscript {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}
changed in app build file
compileSdkVersion 26
buildToolsVersion "26.0.2"
Disable dependencies inspection.
compile 'com.android.support:design:25.3.1
use this
repositories {
maven { url 'https://maven.google.com/' }
}
For react-native projects: Add maven repo to your project. (Removes react-native-fbsdk error after adding maven repo links).
buildscript {
repositories {
jcenter()
mavenCentral()
maven { // Add this block
url "https://maven.google.com"
}
}
}
allprojects {
repositories {
mavenLocal()
jcenter()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
// If something is not found from above maven repo.
maven { url 'https://maven.google.com' } // Add this block
}
}
More Info here
Don't
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
According to Facebook SDK for Android, You should use
// Facebook Android SDK (everything)
compile 'com.facebook.android:facebook-android-sdk:4.+'
for updated case read Changelog and release notes for the Facebook SDK for Android.
compile 'com.facebook.android:facebook-android-sdk:4.26.0'
compile 'com.facebook.android:facebook-android-sdk:4.27.0'
compile 'com.facebook.android:facebook-android-sdk:4.28.0'
compile 'com.facebook.android:facebook-android-sdk:4.29.0'
This question already has answers here:
Failed to resolve: com.android.support:cardview-v7:26.0.0 android
(26 answers)
Failed to resolve: com.google.firebase:firebase-core:11.2.0
(6 answers)
Failed to resolve com.google.android.gms play-services-auth:11.4.0
(13 answers)
Closed 5 years ago.
I want to get current place of my device, and I follow this link:google
And this tutorial requires Google Play services version 11.2.0 or later.
But when I compile 'com.google.android.gms:play-services:11.2.0', I get :
Error:(26, 13) Failed to resolve: com.android.support:appcompat-v7:26.0.0
here is my build.gradle(Module:app):
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "com.example.administrator.googlemap"
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 {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:26.+'
compile 'com.google.android.gms:play-services:11.2.0'
compile 'com.google.android.gms:play-services-maps:11.0.2'
compile 'com.google.android.gms:play-services-places:11.0.2'
compile 'com.google.android.gms:play-services-location:11.0.2'
testCompile 'junit:junit:4.12'
}
And here is my build.grandle(Project)
buildscript {
repositories {
jcenter()
maven { url "https://maven.google.com/"}
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
// 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
}
How can I resolve this Error.?
Instead of variable version name
compile 'com.android.support:appcompat-v7:26.+'
Use constant version, latest is 26.1.0
compile 'com.android.support:appcompat-v7:26.1.0'
You've google maven repo link in buildscript repository list, You should also add google maven repo in project dependencies repository list of your root build.gradle file
allprojects {
repositories {
jcenter()
maven { url "https://maven.google.com/"}
}
}
Selective compile is better option instead of complete play-services artifacts, you should choose what you needed in your project.
compile 'com.google.android.gms:play-services:11.2.0' // -> latest is 11.4.0
break it into your required artifact, like
compile 'com.google.android.gms:play-services-maps:11.4.0'
compile 'com.google.android.gms:play-services-places:11.4.0'
compile 'com.google.android.gms:play-services-location:11.4.0'
If you're using Android Plugin for Gradle 3.0.0 or latter version
repositories {
mavenLocal()
mavenCentral()
google() //---> Add this
}
replace compile with implementation, More about this replacement here
Add
maven {
url 'https://maven.google.com'
}
in your build.gradle, ie,
allprojects {
repositories {
jcenter()
maven {
url 'https://maven.google.com'
}
}
}
And also remove other google dependencies if you use play service 11.2.0
compile 'com.google.android.gms:play-services:11.2.0'
compile 'com.google.android.gms:play-services-maps:11.0.2'
compile 'com.google.android.gms:play-services-places:11.0.2'
compile 'com.google.android.gms:play-services-location:11.0.2'
to
compile 'com.google.android.gms:play-services:11.2.0'
Error:A problem occurred configuring project ':app'.
Could not find support-v4.jar (com.android.support:support-v4:24.0.0).
Searched in the following locations:
https://jcenter.bintray.com/com/android/support/support-v4/24.0.0/support-v4-24.0.0.jar
MY SDK Tool is like this image
And my Gradle is
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
android {
compileSdkVersion 24
buildToolsVersion "24"
dexOptions {
javaMaxHeapSize "4g" //specify the heap size for the dex process
preDexLibraries = false //delete the already predexed libraries
}
defaultConfig {
applicationId "com.lionvisionsits.kkasons"
minSdkVersion 19
targetSdkVersion 24
multiDexEnabled false
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:24.0.0'
compile('com.digits.sdk.android:digits:2.0.0#aar') {
transitive = true;
}
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:cardview-v7:24.0.0'
compile 'com.android.support:design:24.0.0'
compile 'com.android.support:recyclerview-v7:24.0.0'
compile 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2'
compile 'com.android.support:multidex:1.0.1'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
compile 'com.google.code.gson:gson:2.4'
compile 'com.google.android.gms:play-services:9.4.0'
compile 'com.google.firebase:firebase-messaging:9.4.0'
compile 'ch.acra:acra:4.9.0'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'me.relex:circleindicator:1.2.1#aar'
compile 'com.github.arimorty:floatingsearchview:2.0.3'
compile('com.digits.sdk.android:digits:2.0.0#aar') {
transitive = true;
}
compile 'com.android.support:support-v4:24.0.0'
}
apply plugin: 'com.google.gms.google-services'
can anyone help me?
After Updating to v24.2.1 i get this error in debug\AndroidMenifest.xml
Thanks & Regards
Jay
You need to do some changes in your build.gradle file inside platforms/android and need to add maven { url 'https://maven.google.com' } before the jcenter() as follows:
allprojects {
repositories {
mavenCentral()
maven { url 'https://maven.google.com' } //add this code
jcenter()
}
}
This is now essential for new versions of google libraries. They moved their libraries out of the android SDK to the maven repo.
I had the same problem, i updated :
classpath 'com.android.tools.build:gradle:2.+'
and my gradle wrapper
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
and it works
in my case in build.gradle file I had to add and reorder the repositories, such that jcenter is the last place where entry is searched for:
allprojects {
repositories {
mavenCentral() //+ added
maven { url 'https://maven.google.com' } //^ moved up
jcenter()
}
}
I was having the same issue, the following steps fixed my probelm. Give it try and see if it helps:
Go to "File" -> "Project Structure...".
Select "your project" under "Modules" and click on "Dependencies" tab.
Click on the "+" sign and select "1 Library dependency".
In the new popup window, select "support-v4" and click "OK".
Maybe the version of com.android.support:support-v4:24.0.0 is different to the android studio. You can try to do like this: File-> project structure->app->dependencies->+->Library dependency, the select the com.android.support:support-v4:xx.x.x. If any problem, you can change the library to the lastest.
try this inside in android block
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
}
Or if you have model block then try this
compileOptions.with {
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
}
There is no use of buildVersionCode or name required in AndroidManifest.xml. You can better define it in app build.gradle file. Like below:
defaultConfig {
applicationId "com.example.r"
minSdkVersion 15
versionCode 418
versionName "4.4.0"
}
i have the same issue, and now i solve it.
I have two place define "support-v4".
one:maven { url "http://jcenter.bintray.com/" }
because http://jcenter.bintray.com/com/android/support/support-v4/ define "support-v4"
two:compile 'com.android.support:support-v4:+'
I delete compile 'com.android.support:support-v4:+' in my module, then the project works.
Appear this issue may be your project have two place that define "support-v4", so IDE don't known how to find the corrent one.
I am trying to build my Android App I imported from a Git repository. This same app builds correctly in another environment, but in my environment I get the following error:
Error:(41, 13) Failed to resolve: com.afollestad:material-dialogs:0.7.7.0
My build.gradle:
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
android {
compileSdkVersion 22
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "my.app.id"
minSdkVersion 16
targetSdkVersion 22
multiDexEnabled true
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:22.2.0'
compile 'com.android.support:support-v4:22.2.0'
compile 'com.afollestad:material-dialogs:0.7.7.0'
compile 'com.michaelpardo:activeandroid:3.1.0-SNAPSHOT'
compile 'com.github.navasmdc:MaterialDesign:1.2'
compile 'com.android.support:multidex:1.0.1'
compile 'com.squareup.retrofit:retrofit:1.9.0'
compile 'com.squareup.okhttp:okhttp-urlconnection:2.1.0'
compile 'com.squareup.okhttp:okhttp:2.1.0'
compile 'com.google.code.gson:gson:2.3.1'
compile 'joda-time:joda-time:2.3'
compile 'com.joanzapata.pdfview:android-pdfview:1.0.4#aar'
compile 'com.andreabaccega:android-form-edittext:1.2.1#aar'
compile('com.crashlytics.sdk.android:crashlytics:2.5.2#aar') {
transitive = true;
}
}
I also tried different versions (0.7.7.0, 0.7.6.0, 0.7.5.5), but nothing changes. How can I address my issue?
On jCenter there are only two version available 0.7.9.0 and 0.7.9.1. These versions are not available in Maven Central, so check in your project build.gradle that you are using jcenter().
BTW these versions are not updated, the last version released in GitHub is 0.8.5.1.
To use the last version in your project use the following instructions:
Repository
First, add the following to your app's build.gradle file:
repositories {
maven { url "https://jitpack.io" }
}
Core
The core module contains all the major classes of this library,
including MaterialDialog and AlertDialogWrapper. You can create basic,
list, single/multi choice, progress, input, etc. dialogs with core.
dependencies {
// ... other dependencies here
compile('com.github.afollestad.material-dialogs:core:0.8.5.1#aar') {
transitive = true
}
}
The problem is that you use targetSdkVersion 22. If you update targetSdkVersion to 23 and use this latest library version in denendency the problem'll go away:
repositories {
jcenter()
}
dependencies {
compile('com.github.afollestad.material-dialogs:core:0.8.5.1#aar') {
transitive = true
}
}
But if you want to use 22 SDK you should use such dependencies:
repositories {
maven { url "https://jitpack.io" }
}
compile ('com.github.afollestad:material-dialogs:53103863a6') {
transitive = true
}
This is the last version which supports 22 SDK - v. 0.6.4.4. But there is some problem with using old version number in dependency name (maybe because library author migrated to jCenter) and you can use first 10 digits of commit's hash related to this version instead.
or you can use this:
compile 'com.afollestad.material-dialogs:core:0.9.1.0'
instead of
compile 'com.afollestad:material-dialogs:0.7.7.0'