I am trying to use Floating Action Button(FAB) in my application. However, when I am declaring the same I get the error:
android.support.design.widget.FloatingActionButton could not be instantiated.
I have added following commands to my gradle file:
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.android.support:support-v4:23.1.1'
I have also tried with adding following to my style parent:
parent="@style/Theme.AppCompat"
Also tried having my Activity class extend Activity
as well as AppCompatActivity
.
Am I missing something? Pls. help
Android build system uses the Android Plugin for Gradle to support building Android applications with the Gradle build toolkit. The plugin runs independent of Android Studio so the plugin and the Gradle build system can be updated independently of Android Studio.
For FloatingActionButton
requirement
Please update your classpath
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With