After updating Android Studio from 2.3 to 3.0 I changed buildToolsVersion
from 26.0.0 to 26.0.2 and after then I am getting this error:
Cannot reso
Try to add this in your build.gradle(app) dependencies:
resolutionStrategy {
force libraries.support.appCompat
force libraries.support.design
force 'com.android.support:support-utils:26.0.1'
force 'com.android.support:support-compat:26.0.1'
}
I tried all the answers here and so many others from lots of places but only the below techniques worked for me. The simple way is you just need to close the project then import the same project as a Gradle project Or you can go to Project structure -> project -> change Gradel plugin = 4.4 and Android plugin version = 3.1.4. Both of these above methods work.
Note: These versions(4.4, 3.1.4) are latest when I write this answer please use the latest version instead of these.
This is what I did to fix exactly the same problem. 1. Go to SDK manager. 2. Check Android API 27 and Android 8.0 (Oreo) 3. Click "Apply" to download and install those SDKs 4. In build.gradle, change the 'buildToolsVersion "26.0.1"' to 'buildToolsVersion "26.0.2"' and do a gradle sync.
Hope this can help fix your issue.
my problem solved by changing compileSdkVersion
and targetSdkVersion
from 26
to the last version 27
, also u need to upgrade ur dependencies
to 27
.
android {
compileSdkVersion 27
defaultConfig {
applicationId "com......"
minSdkVersion 15
targetSdkVersion 27
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(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.0'
implementation 'com.android.support:design:27.1.0'
}
hope this solve ur problem too :)
Same issue here, if you're using AndroidX
add this :
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
please replace android support libraries.
from
27.1.1
to
28.0.0-alpha3
and replace 27 to 28 for following cases:
compileSdkVersion 28
buildToolsVersion "28.0.0"
targetSdkVersion 28
this will fix the issue.