Reputation: 25
I have tried alot to solve and did as this link StackOverflow but nothing happens..I introduce myself as a beginner in android programming and learning myself .
//Code of styles.xml from values folder
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">wrap_content</item>
<!--<item name="android:textColor">#00FF00</item>-->
<!--<item name="android:typeface">monospace</item>-->
</style>
</resources>
//AND Code for build.gradle Module:app is
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.madhav.schoolmanagement"
minSdkVersion 15
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:28.0.0-alpha1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:support-vector-drawable:28.0.0'
implementation 'android.arch.lifecycle:extensions:1.1.1'
implementation 'com.google.android.gms:play-services-maps:16.1.0'
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'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.android.support:appcompat-v7:+'
implementation 'com.google.firebase:firebase-core:16.0.3'
implementation 'com.google.firebase:firebase-auth:16.0.3'
implementation 'com.google.firebase:firebase-database:16.0.1'
implementation 'com.android.support:appcompat-v7:28.0.0'
}
repositories {
google()
}
buildscript {
repositories {
google()
}
}
apply plugin: 'com.google.gms.google-services'
com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true
Upvotes: 0
Views: 216
Reputation: 165
I think you have not Updated your Android Studio. And Solution for this is Base.Theme.AppCompat.Light.NoActionBar
Upvotes: 0
Reputation: 51
Default styles.xml should look like this
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
</resources>
Upvotes: 0
Reputation: 219
Yes, it occurs to some users try thi if it help you
1 Go to app
2 src
3 main
4 res
5 values // open this..
then update this as
<!-- Base application theme. -->
<style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
Upvotes: 1