Android运行时报错:In <declare-styleable> ConstraintSet

来源:互联网 发布:网络监控能监控qq吗 编辑:程序博客网 时间:2024/06/05 08:03

最近新建项目时,用的studio自动创建Activity,其自动生成根布局为android.support.constraint.ConstraintLayout,因为用着不适应,随手改成了RelativeLayout,没想到项目就这样运行不起来了,报的错是

In <declare-styleable> ConstraintSet,unable to find attribute android:elevationExecution faild for task >com.android.ide.common.process.ProcessException:Failed to execute aaptBUILD FAILED

郁闷了半天,原来是自动创建ConstraintLayout布局时,项目build.greadle里自动引入了

compile 'com.android.support.constraint:constraint-layout:1.0.2'

意思是建议根布局使用ConstraintLayout,这里有两个办法:
1、直接将根布局替换为ConstraintLayout
2、将compile引入的包直接删掉

阅读全文
1 0
原创粉丝点击