It's been 3 days that I can't use any library in github , I used to work with most of them but now it doesn't work at all .
it takes about 5 minutes and then I get a message like this :
Error:(30, 13) Failed to resolve: jp.wasabeef:recyclerview-animators:1.3.0
Show in File<br>Show in Project Structure dialog
here is my gradle :
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "com.xx.xx"
minSdkVersion 11
targetSdkVersion 21
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile files('libs/acra-4.5.0.jar')
compile files('libs/universal-image-loader-1.8.4-with-sources.jar')
compile 'com.android.support:appcompat-v7:23.0.0'
compile 'com.android.support:cardview-v7:23.0.0'
compile 'com.android.support:recyclerview-v7:23.0.0'
compile files('libs/org.apache.http.legacy.jar')
compile 'com.soundcloud.android:android-crop:1.0.1#aar'
compile 'jp.wasabeef:recyclerview-animators:1.2.2'
compile 'com.android.support:design:23.0.0'
compile 'jp.wasabeef:recyclerview-animators:1.3.0'
}
How can I solve this bothering problem ?
I think Because you are using 2 versions of same library. Use one of them and then build the project.
compile 'jp.wasabeef:recyclerview-animators:1.2.2'
and
compile 'jp.wasabeef:recyclerview-animators:1.3.0'
If you are using a RecyclerView 23.0.1 or below. (As this lib document)
dependencies {
compile 'jp.wasabeef:recyclerview-animators:1.3.0'
}
Hope this will help you. Thanks...
Related
Error:(42, 13) Failed to resolve: com.android.volley:volley:1.0.0
When add any dependencies in android build.gradle file it always shows the above error. But same project is running on a different machine same dependencies can add successful. I search lot for solving this problem but can't find any solution. Kindly Please help me to fix the problem Thank you.
I face the same error while adding any dependencies now, but few weeks before i can add any dependencies on my project
build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "24.0.0"
defaultConfig {
applicationId "myappid"
minSdkVersion 17
targetSdkVersion 24
versionCode 1
versionName "1.0"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
jcenter({url "http://jcenter.bintray.com/"})
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:24.0.0'
compile 'com.android.support:design:24.0.0'
compile 'com.android.support:cardview-v7:24.0.0'
compile 'com.android.support:recyclerview-v7:24.0.0'
compile 'com.android.support:support-vector-drawable:24.0.0'
// VectorDrawableCompat
compile 'com.android.support:animated-vector-drawable:24.0.0'
compile 'com.android.support:support-annotations:24.0.0'
compile 'com.satsuware.lib:usefulviews:2.3.6'
compile 'com.github.ganfra:material-spinner:1.1.1'
compile 'com.google.android.gms:play-services-appindexing:8.1.0'
compile 'com.ramotion.foldingcell:folding-cell:1.0.1'
compile 'com.android.volley:volley:1.0.0'
}
I try many way to solve the problem i have faced but no one can rectify the problem. I ask the help of may experience developer, they told me that they never face such a problem in there life. So only solution i found is to reinstall android studio. Now it work perfectly. Any way thanks for your support.
I am working on android studio from one year But i can't face this type of problem. What i am doing is adding a dependency of support library in app build.gradle and then sync the project.
Gradle build running is started in background and then after some time studio is automatically crashed. There is no error or logs are found for crashes. And if I removed the dependency from gradle it works properly. I also restarted the machine and having an latest update of studio but it can't fixed the problem. Thanks in advance for any help.
Here is my app level build.gradle file. I am adding compile 'com.android.support:design:22.2.0' library in my project
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId ""
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:recyclerview-v7:23.1.1'
compile 'com.google.code.gson:gson:2.4'
compile 'com.google.android.gms:play-services-base:8.4.0'
compile 'com.google.android.gms:play-services-maps:8.4.0'
compile 'com.google.android.gms:play-services-gcm:8.4.0'
compile 'com.isseiaoki:simplecropview:1.0.9'
compile "com.mixpanel.android:mixpanel-android:4.8.0"
compile 'de.hdodenhof:circleimageview:2.0.0'
compile 'com.facebook.android:facebook-android-sdk:4.10.1'
}
apply plugin: 'com.google.gms.google-services'
I'm using Android Studio Beta 6, and I've added the RecyclerView support lib to the end of my build.gradle. My app is already running fine, I just need to use the RecyclerView now.
Here's build.gradle:
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
minSdkVersion 14
targetSdkVersion 21
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
addCustomFieldsToBuildConfig(release)
addCustomFieldsToBuildConfig(debug)
}
}
dependencies {
// ...
compile 'joda-time:joda-time:2.1'
compile 'com.google.android.gms:play-services-ads:+'
compile 'com.google.android.gms:play-services-analytics:+'
compile 'com.android.support:support-v13:21+'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.3'
compile files('libs/com_nineoldandroids.jar')
compile files('libs/comscore.jar')
compile files('libs/crittercism_v2_1_7_crashonly.jar')
compile files('libs/urbanairship-lib-1.0.1.jar')
compile files('libs/adobeMobileLibrary-4.8.1.jar')
compile "commons-io:commons-io:2.4"
compile 'org.jsoup:jsoup:1.8.3'
// I WANT TO ADD THESE:
compile 'com.android.support:appcompat-v7:21.+'
compile 'com.android.support:recyclerview-v7:21.+'
}
I've tried specific versions of RecyclerView such as '21.0.2' but they all result in the same issue. I ask Android Studio to sync the gradle settings, and there are no errors.
But as you can see, I can't autocomplete the v7 after support:
In the event that this will help someone in a similar situation with Android Studio, but I had to go to Build -> Make Project before it was able to resolve references to the RecyclerView class.
this my problem over day, my log result is Error:(2) Attribute "titleTextStyle" has already been defined
my project use actionbarsherlock, google_play_service, and another lib, i want to move my old project to android studio. i already tried many link in this site but doesn't work. this my gradle.
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "23.0.0"
defaultConfig {
applicationId "com.ltvie.test"
minSdkVersion 9
targetSdkVersion 21
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
}
}
}
dependencies {
compile project(':lib')
compile 'com.android.support:support-v4:20.0.0'
compile 'com.google.android.gms:play-services:+'
compile 'com.google.code.gson:gson:2.1'
compile 'com.google.guava:guava:11.0.1'
compile 'com.google.protobuf:protobuf-java:2.2.0'
compile 'com.actionbarsherlock:actionbarsherlock:4.4.0#aar'
compile 'com.android.support:support-v4:18.0.0'
compile files('libs/google-api-client-1.10.3-beta.jar')
compile files('libs/google-api-client-android2-1.10.3-beta.jar')
compile files('libs/google-http-client-1.10.3-beta.jar')
compile files('libs/google-http-client-android2-1.10.3-beta.jar')
compile files('libs/google-oauth-client-1.10.1-beta.jar')
compile files('libs/jackson-core-asl-1.9.4.jar')
compile files('libs/json-org.jar')
compile files('libs/jsr305-1.3.9.jar')
compile files('libs/universal-image-loader-1.9.3-SNAPSHOT.jar')
compile files('libs/WebSocket.jar')
}
i read some tutorial that my problem cause I use appcompat-v7 and actionbarsherlock in same time, but in my dependencies nothing appcompat-v7, i try to remove actionbarsherlock then the error disappear but appear more error. how to solve my problem, thanks.
I am going to add material-dialogs library to my project but I get this error Error:Failed to find: com.android.support:appcompat-v7:21.0.3 This is build.gradle..Where is my mistake?Is sth wrong with my project?
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.1"
defaultConfig {
applicationId "com.peomtime.tosca.peomtime"
minSdkVersion 15
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:support-v4:21.0.2'
compile 'com.android.support:appcompat-v7:21.0.+'
compile 'de.hdodenhof:circleimageview:1.2.0'
compile 'com.readystatesoftware.systembartint:systembartint:1.0.3'
//Core
compile 'com.github.gabrielemariotti.cards:cardslib-core:2.0.1'
compile 'com.github.machinarius:preferencefragment:0.1.1'
//compile 'com.github.nirhart:parallaxscroll:1.0'
compile project(':Parallax')
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.3'
compile 'com.afollestad:material-dialogs:0.6.3.1'
}
thank you so much for your help
Check that you have latest libraries installed in Android SDK Manager. For appcompat-v7:21.0.3, the packages need to be checked/updated are:
Android Support Repository
Android Support Library
Also, it's recommended to fix your dependencies version rather than using + to get latest version:
compile 'com.android.support:appcompat-v7:21.0.3'
Not sure why, but I added this repo from Afollestad to my build.gradle (project, not model) and everything was resolved.
repositories {
maven { url "https://jitpack.io" }
}
link