Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio shows red exclamation at drawable attribute

In layout XML files, the red exclamation mark is displayed left of @drawable references. Almost all drawables have this mark:

enter image description here

The content of shape_detail_btn_border.xml is as below. It is a group of shapes and does not have any broken image resource:

<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">     <solid android:color="@android:color/white"/>     <corners android:radius="5dp"/>     <stroke android:width="1dp" android:color="@color/bapul_color_d5d5d5"/> </shape> 

I hover the mouse on the mark and nothing shows up. what does this mean?

Note that the Android Studio version is 1.4 (AI-141.2288178), currently the most recent version. And, there's no problem to build and run the app at all.

like image 700
Youngjae Avatar asked Oct 09 '15 03:10

Youngjae


People also ask

What are Drawables in Android Studio?

A drawable resource is a general concept for a graphic that can be drawn to the screen and which you can retrieve with APIs such as getDrawable(int) or apply to another XML resource with attributes such as android:drawable and android:icon . There are several different types of drawables: Bitmap File.

What is drawable shape android?

The Shape Drawable is an XML file that defines a geometric shape, including colors and gradients. This is used to create a complex shape that can then be attached as the background of a layout or a view on screen.

What is drawable folder in Android directory?

In Android Studio inside the res folder, one can find the drawable folder, layout folder, mipmap folder, values folder, etc. Among them, the drawable folder contains the different types of images used for the development of the application.

How do you insert a picture into drawable?

To import image resources into your project, do the following: Drag and drop your images directly onto the Resource Manager window in Android Studio. Alternatively, you can click the plus icon (+), choose Import Drawables, as shown in figure 3, and then select the files and folders that you want to import.


1 Answers

In short, it's not an error from the code. It tells that "Android Studio failed to display the thumbnail of the given drawable."

Thanks @Ramz for finding an answer at https://stackoverflow.com/a/33032200/361100. I'll leave this post because this question is more descriptive than the linked one.

like image 177
Youngjae Avatar answered Sep 21 '22 14:09

Youngjae