I tried looking other similar questions on stackoverflow, they advice us to changw version of \"buildToolsVersion\" but I dont see word like that in my gradle file.
module app gradle file looks like this...In your file you are missing buildToolsVersion, adding this may help you
apply plugin: 'com.android.application'
android {
//changes
compileSdkVersion 26
buildToolsVersion "27.0.3"
defaultConfig {
applicationId "com.example.dhruv.testhello"
minSdkVersion 24
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 {
implementation fileTree(dir: 'libs', include: ['*.jar'])
//changes
compile 'com.android.support:appcompat-v7:26.0.2'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-
core:3.0.2'
}
At the time of this answer Android Studio 3.1.4 is out with Android Support 28.0.0 Release Candidate(Potential Final, Beta) so please update. Well, here is a config that will certainly work for you.
targetSdkVersion 28
com.android.support:*:28.0.0-rc01
Where * is the resource type.
I was helped by Hossein Seifi's reply but with a change
implementation 'com.android.support:design:28.0.0-alpha3'
to
implementation 'com.android.support:design:28.0.0-alpha1'
and click File -> Invalidate Caches / Restart
In styles.xml,
Changing the theme from Theme.AppCompat.Light.DarkActionBar to Base.Theme.AppCompat.Light.DarkActionBar has worked for me.
Open, res>values>styles.xml
, here you will find a line:
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
replace the line with:
<style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">
That means: Add the word "Base." starting the name of the parent theme.
Open, res --> values --> styles.xml, here you will find a line like this:
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
change it to:
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
In otherwords, change DarkActionBar to NoActionBar