The project I am working on uses the appboy library. Unfortunately this lib depends on the v4 support library and uses this depreciated method. I want to update the support library to version 21.0.0 but I get the following error message.
java.lang.NoSuchMethodError: android.support.v4.widget.SwipeRefreshLayout.setColorScheme
How can I configure gradle so the appboy library uses an older support lib(preferable 20.0.0) but the project uses 21.0.0?
I import appboy like so
compile 'com.appboy:android-sdk-ui:1.5.3'
Appboy has updated the Android SDK to use version 21 of the support library; this issue is resolved in the most current release.
Its because you are trying to use support library v21.0.0 with older version of android.
Just include the new AppCompat v21.0.0 and change the compilation version of your project into android 5.0
Related
When the implementation 'com.karumi:dexter:6.0.0' is added in build.gradle file, Error is shown on line number 24 while implementing appcompat:implementation 'com.android.support:appcompat-v7:26.1.0'
its the build.gradle(Module:app)
Error in Gradle
From your gradle error message, it is seen that your are using the andorid earlier project structure library.
You are trying to implement implementation 'com.karumi:dexter:6.0.0' library which is using the androidx support library structure.
Hence, your are getting that error as you cannot use both the structure as they have been made and organized complete differently.
Solution:
Shift to androidx library structure if you really want to use that library.
Refer this official documentation of Google Android to migrate to andoirdx from android -
Google Developers Documentation
The library you are trying to use is using AndroidX libraries and you are using Andeoid support libraries in your project. Either migrate your project to androidx or ise an older version of the library which use android support libraries.
You should migrate your project AppCopact to AndroidX. For migrating project AppCompact to Androidx Go Refactor -> Migrate to Androidx then tick on BackUp Project and Migrate. After Migration The com.karumi:dexter:6.0.0 library will work perfectly.
I find two new refactor commands, what are the exact functions of
refactor>migrate app to appCompat
refactor>migrate to androidX
Support (compatibility) libraries was changed to AndroidX libraries by Google.
So in the nearest future support libraries won't be supported anymore.
So "migrate to androidX" will do the following:
Android studio will change all imports in your class from android.support. * to androidx. *
Dependencies of your build.gradle will be also changed to relevant androidX libs
Basically I have Android app which uses 23.1.1 of the support library(com.android.support:appcompat-v7:) while Im using a library which uses 25.0.0 version. Basically if I update the version and make it to be equal(the project one and the library one) Im getting a lot of null pointer exceptions which is pretty strange because the app works pretty well at the current version(23.1.1). If I force the library to be using the version of the app - there is a compile error because a new things have been added with the new version(25.0.0). Is it possible somehow to say in the build.gradle let`s the app be using the 23.1.1 version of com.android.support:appcompat-v7: and the library to use its(25.0.0) version of com.android.support:appcompat-v7:?
Is it possible somehow to say in the build.gradle let`s the app be using the 23.1.1 version of com.android.support:appcompat-v7: and the library to use its(25.0.0) version of com.android.support:appcompat-v7:?
No, because there is only copy of appcompat-v7 in your app.
Can you try to remove your import of the 23.x.x of the support library .
The version of the support library that is present in your lib will be use .
My compiledsdkversion is 23. My Android support library has a 24.0.0-alpha1designation at the end of the string which declares it on my gradle app file. Gradle is compiling with errors stating that the support library should not use a different version than the compiledsdkversion.Any ideas on how to get rid of this error. I don't know how to update the compiledsdkversion.
You should use the latest stable version of the Support Library, which is currently 23.2.1 as per the release notes.
I used support design library in my project,but there is a error that it is not found.My android Studio has updated Android Support Library 22.2
compile 'com.android.support:design:22.2.0'
this is my first time use of support design library.can somebody help me?
Jared Burrows is right, need update SDK ( support library )
You need to update the android support Repository in the SDK manager .
Also the Design Library depends on the Support v4 and AppCompat Support Libraries.
Reference:
http://android-developers.blogspot.in/2015/05/android-design-support-library.html
I also suffered from this error, the solution was to open the android sdk and from extras install android support repository.
but on the most recent version android support repository does not exist you have to install local maven repository support library. i hope this will help you.