java.lang.UnsupportedOperationException: Can't convert to dimension: type=0x12

我怕爱的太早我们不能终老 提交于 2019-12-10 20:04:18

问题


I am getting this error, java.lang.UnsupportedOperationException: Can't convert to dimension: type=0x12, from the following lines in my override of the @android:style/Theme.Holo.Light theme below using Android API 4.1.2. It works fine in an older API and the newest. What is the issue here?

<item name="android:windowTranslucentStatus">true</item>
<item name="android:windowTranslucentNavigation">true</item>

I am using this users-sdk line:

<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="19"></uses-sdk>

回答1:


windowTranslucentNavigation and windowTranslucentNavigation

Works Only for Api level 19 or above.Your setting the minSdkversion to 10.

check the api level in the programmatically and set the

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT){
windowTranslucentNavigation=true;

}


来源:https://stackoverflow.com/questions/22927655/java-lang-unsupportedoperationexception-cant-convert-to-dimension-type-0x12

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!