所以我是
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
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。