• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Help cannot find resource file with name (filename)

Hi,

started developing for android i added image file in the drawable folder there are already many images are present.
i have added image and now i want to use this image in button so i am doing this
<Button
android:id="@+id/btSort"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:text="Arrive"
android:textSize="14sp"
android:layout_marginLeft="-5dp"
android:drawableEnd="@android:drawable/sortdirection" />

if i use above code i am getting error . i cant access only sortdirection image because i copied it to this folder but other images can be accessed android:drawableEnd="@android:drawable/sortdirection" on this line .
so to access sortdirection i have to make slight change android:drawableEnd="@drawable/sortdirection" i removed @android and it works.

But why it was not working with android because other files which reside in drawable folder are accessble with both way and sortdirection.png (newly copied file) can only be accessed if i remoe @android from line
 
Back
Top Bottom