尝试用这个库编译一个项目。IntelliJ IDEA 12 在themes.xml 中的非标准元素上显示错误并且不编译。
项目:
<style name="SampleTheme" parent="android:Theme.Holo">
<item name="numberPickerUpButtonStyle">@style/NPWidget.Holo.ImageButton.NumberPickerUpButton</item>
<item name="numberPickerDownButtonStyle">@style/NPWidget.Holo.ImageButton.NumberPickerDownButton</item>
<item name="numberPickerInputTextStyle">@style/NPWidget.Holo.EditText.NumberPickerInputText</item>
<item name="numberPickerStyle">@style/NPWidget.Holo.NumberPicker</item>
</style>
错误:
android-apt-compiler: [samples] /Users/max/work/libs/android-numberpicker/samples/res/values/themes.xml:5: error: Error: No resource found that matches the given name: attr 'numberPickerDownButtonStyle'.
android-apt-compiler: [samples] /Users/max/work/libs/android-numberpicker/samples/res/values/themes.xml:6: error: Error: No resource found that matches the given name: attr 'numberPickerInputTextStyle'.
android-apt-compiler: [samples] /Users/max/work/libs/android-numberpicker/samples/res/values/themes.xml:7: error: Error: No resource found that matches the given name: attr 'numberPickerStyle'.
android-apt-compiler: [samples] /Users/max/work/libs/android-numberpicker/samples/res/values/themes.xml:4: error: Error: No resource found that matches the given name: attr 'numberPickerUpButtonStyle'.
如果您使用和其他库,也会出现此问题。
如何解决这个问题呢?