问题
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