The following classes Could not be instantiated:-androID.support.design.Widget.floatingActionbutton(First paragraph of error)java.lang.NullPointerExceptionat androID.support.v4.graphics.drawable.DrawableCompatLollipop.setTintList(DrawableCompatLollipop.java:56)at androID.support.v4.graphics.drawable.DrawableCompat$LollipopDrawableImpl.setTintList(DrawableCompat.java:145)at androID.support.v4.graphics.drawable.DrawableCompat.setTintList(DrawableCompat.java:270)etc...
任何人都有想法?这是我的build.gradle:
androID {compileSdkVersion 22buildToolsversion "22.0.1"classpath 'com.androID.tools.build:gradle:1.2.3'defaultConfig { applicationID "owensetiawan.tutorials.fab" minSdkVersion 15 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:design:22.2.0'}
如果有人可以帮助我解释我的问题,这绝对是太棒了.
解决方法 嘿,我遇到了与实例化的设计库相同的问题,并解决了这一点步骤1>晶圆代码
<androID.support.design.Widget.floatingActionbutton androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content" androID:layout_gravity="bottom" androID:clickable="true" androID:src="@drawable/search" app:backgroundTint="@color/color_fav" app:borderWIDth="0dp" androID:layout_alignParentBottom="true" androID:layout_alignParentEnd="true" />
步骤2>依赖
compile 'com.androID.support:appcompat-v7:22.2.1' compile 'com.androID.support:recyclervIEw-v7:22.2.1' compile 'com.androID.support:design:22.2.1' compile "com.androID.support:support-v4:22.2.1"
步骤3>上述问题的主要步骤
容易的一个: – 去你的xml并点击预览,并在预览中的栏选择AP1 21
总结以上是内存溢出为你收集整理的android – FloatingActionButton类无法实例化全部内容,希望文章能够帮你解决android – FloatingActionButton类无法实例化所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)