Try to replace @drawable/ic_menu_slideshow
with @android:drawable/ic_menu_slideshow
DrawableLeft fails to compile
题
I currently have a code for a button in XML as such:
<Button
android:id="@+id/button1"
android:layout_width="250dp"
android:layout_height="62dp"
android:layout_gravity="center_horizontal"
android:drawableLeft="@drawable/ic_menu_slideshow"
android:text="Start Slideshow" />
However, I get an error for Error: No resource found that matches the given name (at 'drawableLeft' with value '@drawable/ic_menu_slideshow').
However, when I check on the graphical layout of the XML file, the stock drawable at ic_menu_slideshow
is present. Why do I get this compilation error, and how would I fix it?
解决方案
其他提示
Have you tried cleaning your project? A similar question was asked moments ago so keep an eye on that as well: Can't Resolve Android Resource Strings
不隶属于 StackOverflow