Fixed
Status Update
Comments
vi...@google.com <vi...@google.com>
ra...@google.com <ra...@google.com>
il...@google.com <il...@google.com> #2
Seems to be a DNS problem with systems that have 'obtain DNS server address automatically'. Changed my system to a manual setting and the browser etc now work. SDK 2.2 didn't seem to mind the auto setting though.
ap...@google.com <ap...@google.com> #3
Could you please describe how/where you changed your system to a manual setting?
jb...@google.com <jb...@google.com> #4
Based on its date, this issue was originally reported before Android 2.3. Because of the many changes that existed in Android 4.x compared to previous versions, it's very likely that this issue doesn't exist in recent versions of Android like 4.2.2 or newer. Because of the high likelihood that this issue is obsolete, it is getting closed automatically by a script, without a human looking at it in detail. If the issue still exists on a Nexus 4 or Nexus 7 running Android 4.2.2 and is not related to Google applications, please open a new report accordingly.
Description
1. Create a boilerplate app project
2. Add a dynamic feature module to the project
3. Add a FragmentContainerView to the XML layout for an Activity in the dynamic feature module
4. Ensure the FragmentContainerView has an android:id attribute specified
5. Have the base app module use SplitInstallManager to request the dynamic feature module
6. Once the dynamic feature is installed, launch the dynamic feature module's Activity containing a FragmentContainerView
7. Generate an app bundle from the above configuration and use bundletool to perform a local test installation of the apk set per
8. Once the user launches the base app and performs any action necessary to start the dynamic feature installation and launch of the dynamic feature module's Activity, the app will crash with "java.lang.IllegalStateException: FragmentContainerView must have an android:id to add Fragment ..."
-- Minimal reproduce project:
- What happened.
-- FragmentContainerView causes an IllegalStateException on inflation from a dynamic feature module because its android:id generated by AAPT is too large to fit in a signed 32 bit integer. This causes View.getId() to return a negative value that overflows past the signed integer max of 2^31 - 1, which FragmentContainerView's construcotr considers invalid. FragmentContainerView's constructor then throws the IllegalStateException claiming its XML source didn't have an android:id attribute.
-- Presumably dynamic feature modules bump up the resource IDs significantly, as I'm seeing starting values in R.txt at 0x80000000 which is already beyond the 32 bit signed integer max of 2^31 - 1. The R.txt values in the base module seem to start around 0x7f000000, which leaves much more room before overflow. Given that, the dynamic feature module aspect of this issue is likely incidental and the FragmentContainerView constructor logic is the root cause.
-- Full discussion is detailed in
- What you think the correct behavior should be.
-- The View ID validity check should allow negative values; it should simply be 'id != 0'.
- Context Details:
-- Android Version: 11
-- Test Device: Samsung Galaxy S20 Ultra 5G (SM-G988U)
-- ADB Bugreport Output: