Android Studio FloatingActionButton error

后端 未结 7 877
小鲜肉
小鲜肉 2020-12-05 17:26

I installed Android Studio yesterday, and after battling multiple java and other errors, I have come to an error that I cannot seem to fix. I have not added anything or done

7条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-05 18:00

    That error pops up if any of the following things happen :

    1. You don't have the latest SDK versions installed. Make sure you have the right versions. You need to have Android M installed to use the floating action button. (Use the Android SDK Installer)

    2. Your gradle dependencies are wrong.

    If you are new to Android Studios, chances are the problem is both 1 and 2.

    For the 2nd issue, go to your gradle file and put this in :

    dependencies {
        compile 'com.android.support:design:23.0.0'
    }
    

    That should fix the issue.

提交回复
热议问题