我想在我的应用程序上使用floatingActionbutton,我读到这个:https://guides.codepath.com/android/Floating-Action-Buttons#google-s-official-support-library但是当我运行Activity时我有这个错误:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.xavIEr_laffargue.podcast/com.xavIEr_laffargue.podcast.ACT_Test}: androID.vIEw.InflateException: Binary XML file line #1: Error inflating class androID.support.design.Widget.CoordinatorLayout
XML文件
<androID.support.design.Widget.CoordinatorLayout androID:ID="@+ID/main_content" xmlns:androID="http://schemas.androID.com/apk/res/androID" xmlns:app="http://schemas.androID.com/apk/res-auto" androID:layout_wIDth="match_parent" androID:layout_height="match_parent"> <ListVIEw androID:ID="@+ID/lvTodoList" androID:layout_wIDth="match_parent" androID:layout_height="match_parent"></ListVIEw> <androID.support.design.Widget.floatingActionbutton androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content" androID:layout_gravity="bottom|right" androID:layout_margin="24dp" androID:src="@drawable/ic_action_refresh" app:layout_anchor="@ID/lvTodoList" app:layout_anchorGravity="bottom|right|end" /></androID.support.design.Widget.CoordinatorLayout>
Graddle
*apply plugin: 'com.androID.application'androID { compileSdkVersion 21 buildToolsversion "21.1.2" defaultConfig { applicationID "com.xavIEr_laffargue.podcast" minSdkVersion 21 targetSdkVersion 20 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' compile 'com.androID.support:multIDex:1.0.1' compile 'com.androID.support:support-v13:22.2.0' compile 'com.androID.support:cardvIEw-v7:21.0.+' compile 'com.androID.support:recyclervIEw-v7:21.0.+'}
解决方法:
如果您使用Activity,请将其更改为AppCompatActivity.它可能是活动时的错误.
总结以上是内存溢出为你收集整理的扩展类android.support.design.widget.CoordinatorLayout时出错全部内容,希望文章能够帮你解决扩展类android.support.design.widget.CoordinatorLayout时出错所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)