29

I get this message in android studio xml preview: "The graphics preview in the layout editor may not be accurate: -Paint.setShadow is not supported." Without having this line of code at all in my project. Also I tried to run "Edit-Find-Find in Path" and didn't find this line of code at all in all my project, so why do I get this message?

I read this question, but don't think its the right answer cause this message start to appear after I tried few lines of code containing shadow values, but remain also after deleting those lines.

enter image description here

Community
  • 1
  • 1
Yuval Levy
  • 2,397
  • 10
  • 44
  • 73
  • 3
    http://stackoverflow.com/a/27849933/1061944 – Murtaza Khursheed Hussain Dec 17 '15 at 11:34
  • 4
    Possible duplicate of [What does this error means "The graphics preview in the layout editor may not be accurate: Paint.setShadowLayer is not supported"?](http://stackoverflow.com/questions/27849762/what-does-this-error-means-the-graphics-preview-in-the-layout-editor-may-not-be) – Sufian Dec 17 '15 at 15:19
  • I have a similar issue and it's turning into a fatal error on runtime. – logicbloke Mar 25 '16 at 00:01

4 Answers4

10

don't worry, it is saying that, preview of code will not as same as output, sometimes Invalid cache/restart will work, or change API level in combo box at the top of graphical preview.

Chirag thaker
  • 323
  • 2
  • 4
  • 15
1

Its showing this because of custom graphics. Hopefully the will have these views in next android studio update

1

The reason for warning is because you are using some of the material design elements (like floating action button) this warning can be removed by using Cordinate layout with these element

0

As it is not supporting because of the version tools From: compileSdkVersion 26 buildToolsVersion "26.0.1"

to:compileSdkVersion 19 buildToolsVersion "19.0.0"

may be like version compilation of lower to higher sdk..

U can change the version from higher to lower.

---------- oR

U can IGNORE ALL FIDELITY WARNINGS and run the CODE

--

Eshan Chattaraj
  • 368
  • 1
  • 6
  • 19