Error message when trying to change theme

0 richard Stephen · October 16, 2015
Hello All.

i get this error message anytime i try to change my theme , please how do i resolve this?
/images/forum/upload/2015-10-16/38b5ab62a40fcd02ffe61646cddaacd1.jpg

Post a Reply

Replies

- page 1
Oldest  Newest  Rating
0 Stefan Mostert · October 22, 2015
I am experiencing the same problem...
/images/forum/upload/2015-10-22/60a1f7d84ebf9a14f374aee28b705b2c.png
0 Gary Whitney · October 22, 2015
There are many things that can cause the rendering error message.
Sometimes I get it on a new activity and switch to Text mode then back to Design mode and it's gone.

I don't think yours is so simple. The error is definitely telling you that you need to use an AppCompat Theme, and something about AppBarLayout..


I read somewhere that Material changed the way the ActionBar looks and what it doesn't support.

To better understand your problem
I started a new project ans switched themes (using the icon in Design mode) no problem.
So I am wondering what you are doing different. Do you get the problem if you start a new project with min API16?
Android is constantly evolving and things become depreciated.
* Are you trying to follow and old example that changes the type of Activity?.
* Is your min API using features not supported by Material?

Here are some places to look at for clues.
1. What is your min API?
2. What is your activity.?
Try -  public class MainActivity extends AppCompatActivity {
and
import android.support.v7.app.AppCompatActivity;
3.Check your style
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
</style>

Hope this helps.
0 Niko Badjar · October 21, 2015
This happens to me as well. Really frustrating, don't know what's causing it.
0 Suson Waiba · October 20, 2015
I have download all the suport lib and still the same problem. but works with default app theme. then if you change to material light or dark or another pre lib ..! it shows error. not yet got solution. if you have one. please share.
0 Suson Waiba · October 19, 2015
You can solve it by clicking on >> Refresh << button at in line of zoom + and zoom - !! something like refresh icon is  there.! I had that problem and solve by doing refresh. OR goto File > Invalidate Caches / Restart... || hop this helped.!
0 Mats Braa · October 19, 2015
Having the exact same problem as Suson Waiba. I've also installed the Android support library which did not fix the problem. 
0 Gary Whitney · October 19, 2015
I think it might be the support library is not loaded.
I see you are using the latest  version 23 and the exception error states you need to use appCompat lib.

Click the SDK Manger icon and then select SDK Tools.
Is the support library installed?
Mine wasn't and I had a similar problem.
+1 Suson Waiba · October 19, 2015
/images/forum/upload/2015-10-19/464b606fd874ae315e7ab62bfa0066f8.png
+1 Suson Waiba · October 19, 2015
This is what happening on my Android Studio 1.4 while changing app theme to Material Light !! what to do, to fix this problem.? it is annoying me.
0 Gary Whitney · October 17, 2015
I just notice the note on your screen capture.
Check your layout in Text view. the note indicates you are missing the Layout_width and or layout_height attribute.
  • 1
  • 2

Java / Android Development

107,178 followers
About

Very popular language used to create desktop applications, website applets, and Android apps.

Links
Moderators
Bucky Roberts Administrator