Why do I get these "Rendering Problems"?

0 Bekka Alv · October 22, 2015
I don't know how to solve the problems. Please help! Thanks in advance!

This message pops-up in the Android Studio 1.4  after adding a new activity:

Rendering Problems:
Couldn't resolve resource @dimen/activity_horizontal_margin (5 similar errors not shown)
@dimen/activity_horizontal_margin in attribute "paddingLeft is not a valid format. (Edit)
(5 similar errors not shown)


Post a Reply


Oldest  Newest  Rating
0 Gary Whitney · October 23, 2015
There are a LOT of things that can cause Rendering errors.
What the error means is something needed for the rendering is either missing or doesn't make sense to the Rendering process.

You should not get these errors when you simply start a new blank activity, but sometimes you do. I think it is because the Build and Index processes haven't completed yet. When this happens to me I switch to the Text mode of editing and then switch back.

The error in your screenshot indicate a problem with the dimensions. However dimensions are provided as part of the Blank Activity. Open the Values folder in your project explorer, then double click the dimens.xml file. You should see something like this

<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>

<dimen name="instruction_bottom_margin">7dp</dimen>
<dimen name="instruction_padding">5dp</dimen>

These are the dimensions the error is referring to.

Sometimes running a Build > Clean can clear up errors that don't make sense.

But Like I said you shouldn't be getting these with a NEW Blank Activity. So if you are getting theses errors AFTER you have modified the Blank Activity then it is something you did like change the default Activity to ActionBarActivity or something else.

Please Reply if this helped or if you found a solution, so if another person reads it, they will know what to do.
  • 1

Java / Android Development


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

Bucky Roberts Administrator