关于打包签名时 出现错误---Error:Error: Expected resource of type styleable [ResourceType]
2017-12-01 09:28
519 查看
今天打包签名时出现下面的错误---- Error:Error: Expected resource of type styleable [ResourceType]。
![](https://img-blog.csdn.net/20171201092937518?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvc2luYXRfMzUzNDQ2ODA=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
解决方法
解决方法
@SuppressWarnings("ResourceType") //加上这个注释 忽略该警告 就可以编译打包签名 public AlignTextView(Context context, AttributeSet attrs) { super(context, attrs); setTextIsSelectable(false); int[] attributes = new int[]{android.R.attr.lineSpacingExtra, android.R.attr.lineSpacingMultiplier}; TypedArray arr = context.obtainStyledAttributes(attrs, attributes); lineSpacingAdd = arr.getDimensionPixelSize(0, 0); lineSpacingMultiplier = arr.getFloat(1, 1.0f); originalPaddingBottom = getPaddingBottom(); arr.recycle();
相关文章推荐
- 运行时没问题 编译打包时出现 Error: Expected resource of type styleable [ResourceType] 错误
- 安卓AS打包项目出现错误-【Android】Error: Expected resource of type styleable [ResourceType]
- androidstudio打包错误【Android】Error: Expected resource of type styleable [ResourceType]
- AS打包APK出现Expected resource of type styleable [ResourceType]
- Android studio 2.3 打包版本,提示 Error: Expected resource of type styleable [ResourceType]
- Error: Expected resource of type styleable [ResourceType]
- Error:Error: Expected resource of type id [ResourceType]打包apk是提示错误
- Error-Expected resource of type styleable [ResourceType]
- 【Android】Error: Expected resource of type styleable [ResourceType]
- Android Studio打包错误Error:Error: Expected resource of type id [ResourceType]
- 【Android】Error: Expected resource of type styleable [ResourceType]
- Error-Expected resource of type styleable [ResourceType]
- 【Android】Error: Expected resource of type styleable [ResourceType]
- Error: Expected resource of type styleable [ResourceType]
- Android Studio打包错误Error:Error: Expected resource of type id [ResourceType]
- Error:Error: Expected resource of type styleable [ResourceType]
- Error:Error: Expected resource of type id [ResourceType]打包apk是提示错误
- 【Android Studio】Error: Expected resource of type styleable [ResourceType]
- Androidstudio下打包apk提示Error: Expected resource of type id [ResourceType]解决办法
- AndroidStudio--编译出错-Expected resource of type styleable [ResourceType]