Error: "The graphics preview in the layout editor may not be accurate: Paint.setShadowLayer is not supported"

Zee picture Zee · Jan 8, 2015 · Viewed 26.2k times · Source

I'm using Eclipse and I just created a home page (menu) with 2 image buttons, but I am getting this error:

The graphics preview in the layout editor may not be accurate:

Paint.setShadowLayer is not supported.

What does it mean? And how can I solve it?

I am using API 21.

Answer

Gabe Sechan picture Gabe Sechan · Jan 8, 2015

It means the preview doesn't know how to implement setShadowLayer. This means the preview won't look exactly like the result rendered on the device. Which is one of many reasons why you shouldn't trust the preview app- always test your layouts on a physical device before assuming they're done.