So I am pretty new to android and I am trying to setup a floating action button with the Android Design Support Library using this guide in Android Studio.
My Project: Noted build.gradle file:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
My Module: app build.gradle file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.example.noted"
minSdkVersion 21
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.2.0'
compile 'com.android.support:support-v4:22.2.0'
compile 'com.android.support:design:22.2.0'
}
In myactivity_main.xml
I try to implement
<android.support.design.widget.FloatingActionButton
... />
but I get one of those Rendering Problems pop ups after building saying:
The following classes could not be found: -android.support.design.widget.FloatingActionButton
My guess is that I'm doing something wrong with my dependencies but I really have no idea. I have been trying to get this to work for hours with no luck and would really appreciate any help.
Thanks!