Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

error: invalid parent reference 'style/Widget.AppCompat.Light.ActionBar.Solid.Inverse'

theme.xml:

<style name="Theme.App.ActionBar" parent="style/Widget.AppCompat.Light.ActionBar.Solid.Inverse">
    <!-- Support library compatibility -->
    <!--<item name="elevation">0dp</item>-->
</style>

Error:(160, 5) error: invalid parent reference 'style/Widget.AppCompat.Light.ActionBar.Solid.Inverse'.

APP model: buding.gradle like this:

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.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'

}

I add com.android.support:appcompat-v7:26.1.0, but whay it is still like this.

I am new to android, what's the point of this.

thank you for your help.

like image 387
Kotliner Avatar asked Jul 20 '18 17:07

Kotliner


1 Answers

For Android 2.1 and higher

<style name="MyActionBar" parent="@style/Widget.AppCompat.Light.ActionBar.Solid.Inverse">

For Android 3.0 and higher only

<style name="MyActionBar" parent="@android:style/Widget.Holo.Light.ActionBar.Solid.Inverse">
like image 197
Mohammed Hamed Avatar answered Sep 24 '22 03:09

Mohammed Hamed