I am working on an android project where in activity_main layout i wish to add a floating action button.However as soon as i try to use it android studio ask to add com.android.support:support-v4:20.1.0
.
However, if I add it into my project it causes R
cannot be resolve error whereas I am unable to use floating action button if i don't add this library.
What should i do?
You need to add support design library in your gradle
implementation 'com.android.support:design:20.1.0'
or
compile'com.android.support:design:20.1.0'
depending of your gradle version