1

I have a rather weird problem, in my Android Studio's drawable project folder I have copied a .png material (from here https://design.google.com/icons/index.html#ic_settings_remote). I have named it connect.png. In the activity main I am referencing it the following way:

<android.support.design.widget.FloatingActionButton
    android:id="@+id/fab"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="bottom|end"
    android:layout_margin="@dimen/fab_margin"

    android:src="@drawable/connect.png" />

With the last line, ofc. It spits out 2 errors: Can't resolve resource "@android:drawable/connect.png" Failed to convert "@android:@drawable/connect.png" What I've tried to fix this out:

  1. restart the Android Studio
  2. recopy the material resource in drawable folder
  3. to go to Build->Clean project Neither of all those worked, I am looking forward to your answers.
KDX2
  • 945
  • 2
  • 14
  • 31
  • Possible duplicate of [Android: failed to convert @drawable/picture into a drawable](http://stackoverflow.com/questions/8874262/android-failed-to-convert-drawable-picture-into-a-drawable) – Bö macht Blau Mar 03 '16 at 17:37
  • More specifically, the information you need is [here](http://stackoverflow.com/a/19314797/5015207) – Bö macht Blau Mar 03 '16 at 17:38

1 Answers1

1

Try it (without .png):

android:src="@drawable/connect"
walkmn
  • 2,322
  • 22
  • 29
  • 1
    You are awesome, thank you soo much! It solved it, I will check your answer as a solution to the topic after 12 minutes because the system doesn't permit me to do it now. I was strictly sticking to a tutorial and probably the syntax used there was either incorrect or deprecated. Thank you again! – KDX2 Mar 03 '16 at 17:38