To change the target SDK to 28, I did the following in build.gradle:
android {
compileSdkVersion 28
defaultConfig {
targetSdkVersion 28
...
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0' //-- line with error
implementation 'com.android.support:design:28.0.0' //-- line with error
implementation 'com.android.support:support-annotations:28.0.0'
implementation 'com.squareup.okhttp3:okhttp:3.9.1'
implementation "com.google.code.gson:gson:2.8.2"
implementation files('libs/commons-io-2.4.jar')
implementation files('libs/WebtrendsAndroidClientLib.jar')
// Urban Airship -- Start
api 'com.urbanairship.android:urbanairship-sdk:9.0.0'
// Recommended for in-app messages
implementation 'com.android.support:cardview-v7:28.0.0' //-- line with error
// We need to add these to force Urban AirShip and Google play services to use latest version.
implementation 'com.android.support:animated-vector-drawable:28.0.0' //-- line with error
implementation 'com.android.support:mediarouter-v7:28.0.0' //-- line with error
implementation "com.google.android.gms:play-services:11.8.0"
// Urban Airship -- End
//-- third party lib
implementation 'com.github.barteksc:android-pdf-viewer:2.4.0'
implementation 'com.sothree.slidinguppanel:library:3.3.0'
implementation 'com.google.maps.android:android-maps-utils:0.5+'
//api 'at.favre.lib', name: 'bytes', version: '0.2.0'
api 'at.favre.lib:bytes:0.2.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
}
But in Android Studio IDE, it shows error for line:
com.android.support:appcompat-v7:28.0.0
and the description:
If I comment this line, the next line which has "28.0.0" will have same error. So it seems like none of those with "28.0.0" is in effect at all.
What I have done incorrectly?
Not
updated with full contents in "dependencies" and marked each implementation that will have error. each error is exactly the same one as the description in the image
BTW, tried the solution in this url: All com.android.support libraries must use the exact same version specification but it doesn't work for me at all and same error happens.
** Note on Note **: The solution in the url: All com.android.support libraries must use the exact same version specification does work. You need to "Sync" the project.
Thanks,
Shawn
edit use this in your dependencies
implementation 'com,android.support:support-v4:28.0.0'
try this and let me know if solved the problem.