项目报错:Attribute "height" already defined with incompatible format.

来源:互联网 发布:unity3d 闪屏 编辑:程序博客网 时间:2024/06/06 04:40

报错如下:

D:\Users\Administrator\AndroidStudioProjects\Njb\app\build\intermediates\res\merged\debug\values\values.xmlError:(674) Attribute "height" already defined with incompatible format.Error:(227) Original attribute defined here.Error:(674) Attribute "height" already defined with incompatible format.Error:(227) Original attribute defined here.Error:Execution failed for task ':app:processDebugResources'.> com.android.ide.common.process.ProcessException: Failed to execute aapt

原因:

自定义属性的属性名称不能跟系统默认的名称冲突.

解决方法:

双击出错位置可以看到height是哪里定义的属性。

然后打开我们的values/attrs,删除这个height,再clean一下即可

阅读全文
0 0