Rendering Problems - Android Studio (Mac)

+1 Caleb Leonard · November 10, 2015
Hey guys!

So I am very new to programing and writing an app with Android Studio. As I was starting to teach myself by following with Bucky's videos, I ran into this error:

------
java.lang.IllegalArgumentException: You need to use a Theme.AppCompat theme (or descendant) with the design library.
at android.support.design.widget.ThemeUtils.checkAppCompatTheme(ThemeUtils.java:34)
at android.support.design.widget.AppBarLayout.<init>(AppBarLayout.java:145)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.jetbrains.android.uipreview.ViewLoader.createNewInstance(ViewLoader.java:458)
at org.jetbrains.android.uipreview.ViewLoader.loadClass(ViewLoader.java:170)
at org.jetbrains.android.uipreview.ViewLoader.loadView(ViewLoader.java:103)
at com.android.tools.idea.rendering.LayoutlibCallbackImpl.loadView(LayoutlibCallbackImpl.java:190)
at android.view.BridgeInflater.loadCustomView(BridgeInflater.java:218)
at android.view.BridgeInflater.createViewFromTag(BridgeInflater.java:145)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:835)
at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:811)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
at android.view.LayoutInflater.inflate(LayoutInflater.java:394)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:223)
at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:426)
at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:350)
at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:510)
at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:498)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:888)
at com.android.tools.idea.rendering.RenderTask.createRenderSession(RenderTask.java:498)
at com.android.tools.idea.rendering.RenderTask.access$600(RenderTask.java:72)
at com.android.tools.idea.rendering.RenderTask$3.call(RenderTask.java:610)
at com.android.tools.idea.rendering.RenderTask$3.call(RenderTask.java:607)
at com.android.tools.idea.rendering.RenderService.runRenderAction(RenderService.java:366)
at com.android.tools.idea.rendering.RenderTask.render(RenderTask.java:607)
at com.android.tools.idea.rendering.RenderTask.render(RenderTask.java:629)
at com.intellij.android.designer.designSurface.AndroidDesignerEditorPanel$6.run(AndroidDesignerEditorPanel.java:480)
at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:320)
at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:310)
at com.intellij.util.ui.update.MergingUpdateQueue$2.run(MergingUpdateQueue.java:254)
at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:269)
at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:227)
at com.intellij.util.ui.update.MergingUpdateQueue.run(MergingUpdateQueue.java:217)
at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238)
at com.intellij.util.Alarm$Request$1.run(Alarm.java:351)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:695)

------
This error prevents me from modifying the visual layouts for my app. I can not see what I am doing, which is very bad because I am learning to code, and I like to see what I am doing with my app.
If any of you have encountered this error and solved it (or have suggestions to solve it), I would love to hear what you did, either Mac, Linux, or PC. Perhaps I could trace the error on my Mac and fix this problem. 

Here are the specs of my Mac, Android Studio, and Java:

Macbook Pro Retina, Early 2013 (13")
Mac OS X 10.11.1 (El Capitan) 
8 GB of RAM
2.6 GHz i5 Core

Android Studio 1.4.1
/images/forum/upload/2015-11-10/3af8202286ed6bf85cf3357f332da7ea.png
Java Runtime Enviornment 1.6.0 
Java Version 8, update 65 (JDK 8u65)

Thank you very much for your help! I have a screenshot attached as well. Please let me know of your solution ideas. If you need more information, feel free to ask me questions and I will answer it as soon as I can!


Post a Reply

Replies

Oldest  Newest  Rating
0 Peter Lund · November 14, 2015
Yes I have the same problem that I am not able to change the theme to many of those listed, so I keep myself to the themes that work. I wonder if this has to do with something I have not downloaded yet, but I just choose not to change the theme to keep going instead of investigating this further.

I downloaded Android studio to my mac early this November. 

Another difference is that I get 2 xml files activity_main.xml and content_main.xml when starting a new project. Bucky got only one when he did the tutorial half a year earlier. (I guess that is something they have changed in the later version of studio.)
  • 1

Java / Android Development

106,976 followers
About

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

Links
Moderators
Bucky Roberts Administrator