Error: Found item Attr/font more than one time Error: Execution failed for task
2016-08-09 10:20
543 查看
在 attrs,xml 里面定义属性,有重复的属性时编译报错 Error: Found item Attr/font more than one time Error: Execution failed for task
解决办法:
这样书写后编译通过
解决办法:
//定义属性
<attr name="titleTextSize" format="dimension" /> <attr name="titleTextColorRes" format="reference" />
//使用属性
<declare-styleable name="SettingItemView"> <attr name="titleTextSize" /> <attr name="titleTextColorRes" /> </declare-styleable> <declare-styleable name="FilterView"> <attr name="titleTextSize" /> <attr name="titleTextColorRes" /> </declare-styleable>
这样书写后编译通过
相关文章推荐
- Android自定义属性 Error: Found item Attr/font more than one time Error
- Error:Error: Found item Attr/duration more than one time
- Error:Execution failed for task ':app:validateSigningDebug'. Keystore file not found for signing。。。
- Error:Execution failed for task ':app:dexDebug'. > com.android.ide.common.process.ProcessException:
- HibernateException:More than one row with the given identifier was found: 1, for class....
- Error:Execution failed for task ':app:preDexDebug'. com.android.ide.common.process.ProcessException:
- Error:Execution failed for task ':app:packageDebug'. > Duplicate files copied in APK META-INF/LICENS
- Error:Execution failed for task ': :dexDebug'. > com.android.ide.common.process.ProcessException: or
- Error:Execution failed for task ':app:packageDebug'.
- Android Studio 发生 Error:Execution failed for task ':app:packageDebug'.
- Error:Execution failed for task ':app:dexDebug'.finished with non-zero exit value 2
- Android Studio 报错 Error:Execution failed for task ':app:dexDebug'。support-v7 Theme.AppCompat.Light
- Error:Execution failed for task ':app:dexDebug'.
- android studio Error:Execution failed for task ':app:dexDebug'.解决
- Error:Execution failed for task ':app:dexDebug'. > com.android.ide.common.process.ProcessException:
- Android Studio Error:Execution failed for task ':app:packageDebug'.
- Error:Execution failed for task ':myapp:dexDebug'. com.android.ide.common.process.ProcessException:
- Error:Execution failed for task ':app:dexDebug'.> com.android.ide.common.process.ProcessException: o
- Error:Execution failed for task ':app:compileDebugAidl'. > Executor Singleton not started
- Error:Execution failed for task ':app:dexUmengDebug'. > com.android.ide.common.process.ProcessExcept