【发布时间】:2016-06-23 06:17:27
【问题描述】:
这是我的文件的粗略概念。我继承了一堆使用public.xml 文件将ids 映射到themes 的代码。此代码抛出错误:
Error:(40, 24) Integer types not allowed (at 'theme' with value '0x7f09007a')
但是,当我将 android:theme="0x7f09007a" 替换为 android:theme="@style/myCoolTheme 时,一切正常。我需要能够使用这些ids,因为我继承的更多代码使用它们。我是否缺少使清单文件使用 public.xml? 中的 id 映射的东西
app/src/main/res/AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest ...
<application
android:theme="0x7f09007a"
...
</application>
</manifest>
app/src/main/res/values/public.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<public type="style" name="myCoolTheme" id="0x7f09007a" />
...
</resources>
app/src/main/res/values/style.xml
<resources>
<style name="AppTheme"
...
</style>
<style name="myCoolTheme" parent="@style/AppTheme" />
</resources>
【问题讨论】:
标签: java android android-xml