Android 1.5/1.6 issue with style and autogenerated R.java file
- by Gaks
I'm having strange issue with R.java file and styles defined in my resources.
Here's some code:
In res/values/strings.xml:
<style parent="android:Theme.Dialog" name="PopupWindowStyle">
<item name="android:windowBackground">@drawable/bg1</item>
<item name="android:textColor">@android:color/black</item>
</style>
In AndroidManifest.xml:
<activity
android:name=".RegisterScreen"
android:icon="@drawable/ico"
android:label="@string/applicationName"
android:theme="@style/PopupWindowStyle"
android:configChanges="locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|fontScale">
</activity>
In autogenerated gen/.../R.java:
public static final class style {
public static final int PopupWindowStyle=0x7f090000;
}
After some changes in the project, eclipse changed autogenerated value for PopupWindowStyle from 0x7f080000 to 0x7f090000. After that, on Android 1.5, RegisterScreen activity is displayed without PopupWindowStyle style - there is an error displayed in logcat:
Skipping entry 0x7f090000 in package table 0 because it is not complex!
On Android 1.6 however everything works fine - PopupWindowStyle works like it was before it's integer value has changed.
I was testing this issue, by reverting the source code to older revisions. I can confirm, that this problem started occurring after src code commit, which changed two files completely unrelated to this part of code - and an autogenerated R.java file.
Any idea what could cause that?