Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rendering problems in Android Studio v 1.1 / 1.2

When I add android.support.v7.widget.Toolbar or another android.support.v7.widget.* there are rendering problems.

But Support Library is up to date. And I complied in dependecies properly. I can import them in MainActivity.java

What is the problem?

like image 853
Zhambulable Avatar asked Mar 15 '15 15:03

Zhambulable


People also ask

What does render problem mean in Android Studio?

rendering problem caused your designer preview used higher API level than your current android API level. Adjust with your current API Level. If the API level isn't in the list, you'll need to install it via the SDK Manager.

What is rendering in Android Studio?

UI Rendering is the act of generating a frame from your app and displaying it on the screen. To ensure that a user's interaction with your app is smooth, your app should render frames in under 16ms to achieve 60 frames per second (why 60fps?).

Why is Android Studio not working?

If Studio doesn't start after an upgrade, the problem may be due to an invalid Android Studio configuration imported from a previous version of Android Studio or an incompatible plugin.


2 Answers

UPDATE: Apparently they have fixed this bug in the final Android Studio 1.3 release (according to users reporting this issue solved in the issue tracker: https://issuetracker.google.com/issues/37043358).

This is a known bug since Android Studio build 1.1, which still exists in AS versions 1.2 and 1.3 beta. Switching the preview's API level from 22 to 21 fixes the for most people. While waiting for a fix you could try it as well.

Android Studio Layout Preview - Switch API to 21

UPDATE: This is already reported as a known issue of Android Studio (http://tools.android.com/knownissues#TOC-Can-t-Render-Layouts-in-Android-Studio-1.2)

like image 170
david.schreiber Avatar answered Oct 17 '22 02:10

david.schreiber


I don't know if this will help or not, but I was creating a test project (direct from the wizard, no custom code) and getting this error. Trying to modify the project structure and find the missing class didn't help.

The build failed with the following error:

***rendering problems

The following classes could not be found android.support.v7.internal.widget.ActionBarOverlayLayout***

Obviously it's not the final solution, but changing the Theme in design view from the base "project theme" to anything else allows it to build.

like image 96
Zeus56 Avatar answered Oct 17 '22 04:10

Zeus56