无法设置浮动动作按钮无法找到类(Android Studio)

所以我是 Android的新手,我正试图在Android Studio中使用 this guide设置一个浮动动作按钮.

我的项目:注意build.gradle文件

// 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()
    }
}

我的模块:app build.gradle文件

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'
}

在myactivity_main.xml中我尝试实现

<android.support.design.widget.FloatingActionButton 
    ... />

但是,在建立说明之后,我得到了一个“渲染问题”弹出窗口:

找不到以下类:
-android.support.design.widget.FloatingActionButton

我的猜测是,我的依赖关系出了问题,但我真的不知道.我一直试图让这个工作几个小时,没有运气,真的很感激任何帮助.

谢谢!

解决方法

我有同样的问题,更新了Android支持库“,”Android支持库“(22.2.1)和”Android SDK工具“(24.1.2)使用SDK管理器现在它的工作正常一旦更新完成重建项目.更多 https://developer.android.com/tools/support-library/setup.html

相关文章

Android性能优化——之控件的优化 前面讲了图像的优化,接下...
前言 上一篇已经讲了如何实现textView中粗字体效果,里面主要...
最近项目重构,涉及到了数据库和文件下载,发现GreenDao这个...
WebView加载页面的两种方式 一、加载网络页面 加载网络页面,...
给APP全局设置字体主要分为两个方面来介绍 一、给原生界面设...
前言 最近UI大牛出了一版新的效果图,按照IOS的效果做的,页...