Couldn't resolve resource @style/Widget.Holo.Light.ActionMode.Inverse
Asked Answered
P

3

11

I'm creating an Android app in Android Studio. When I open the layout editor, I see that gray "popup window" on top of the layout, which says that it

Couldn't resolve resource @style/Widget.Holo.Light.ActionMode.Inverse.

This happens when I change the "rendering version" to API 15 (Android 4.0.3).
It worked a minute ago, but when I switched back to the layout, I just got this error.

Edit: I use the AppCompat library.
The theme is defined like this

<style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar" />

The app works fine when I run it, but doesn't render correctly (at least it's giving me the error) in the editor.

I would be glad if someone could help me with this. Thanks!

Pomcroy answered 27/2, 2015 at 17:38 Comment(3)
Are you using the appcompat library?Ferne
@ZiadAkiki Yes, I do. See the updated question.Pomcroy
here is the issue code.google.com/p/android/issues/detail?id=163572 in my case it's not taking android:gravity="left" for Device running API 14 !!! surprisingly android:gravity="left|right" works!Foreskin
Z
16

This problem occured to me when updating Android Studio to version 1.1.0 and opening an old project without changing anything.

For me only changing the preview's rendering API to 19 or above makes the message disappear.

Zeitgeist answered 4/3, 2015 at 22:26 Comment(2)
Exactly! It did start appearing when I updated Android Studio. It works by changing the render version. I've already tried that. I was thinking of a way to download/find the missing resources or something alike, but I'll mark this as correct. Thanks!Pomcroy
This seem more like a workaround, not a real solution!Singleton
D
10

Hey I faced the same problem and the solution that i figured out was - In android studio Open the Select Theme Dialog and under the All category select NoTitleBar.OverlayActionModes and press okay. The problem would be solved. But it can show up into a dark theme.

Dredger answered 18/3, 2015 at 20:8 Comment(2)
Sadly this doesn't work for me, however, the preview doesn't really matter. I just use it to position the components, then try the rest on my phone. Thanks anyway!Pomcroy
Your welcome.! It worked for my app though. But yea it doesn't matter if its working on your device.Dredger
F
0

Make you project API Level newer.
For me,the problem occured when my build.gradle content like this:

compileSdkVersion 16
buildToolsVersion "23.0.2"

defaultConfig {
    applicationId "com.xiaoguang.xx"
    minSdkVersion 16
    targetSdkVersion 16
    versionCode 1
    versionName "1.0"
}

After i download the sdk 19 and change build.gradle, the problem was fixed.

compileSdkVersion 19
buildToolsVersion "19.1.0"

defaultConfig {
    applicationId "com.xiaoguang.xx"
    minSdkVersion 19
    targetSdkVersion 19
    versionCode 1
    versionName "1.0"
}

change preview'api

Furfuran answered 6/3, 2016 at 2:9 Comment(1)
This "fixes" the problem by making your project not work with SDK version 16.Charterhouse

© 2022 - 2024 — McMap. All rights reserved.