Monday, September 25, 2017

[Android][Resolved] import android.support.design.widget.floatingactionbutton not found

Problem



import android.support.design.widget.FloatingActionButton
Unresolved reference :  design

Solve

Step 1)
Open your build.grade in app level.

Step 2)
Add this lines into dependencies :
compile 'com.android.support:design:25.3.1'
The text in red better if same with your version number of com.android.support:appcompat, for my case, it's com.android.support:appcompat-v7:25.3.1, so i use com.android.support:design:25.3.1.



Step 3)

After edited the file, don't forget to click Sync Now at top-right corner.


Reference

https://stackoverflow.com/questions/38373037/the-import-android-support-design-widget-floatingactionbutton-cannot-be-resolved

No comments :

Post a Comment