Fixed
Status Update
Comments
il...@google.com <il...@google.com>
ap...@google.com <ap...@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.
jb...@google.com <jb...@google.com> #3
Could you please describe how/where you changed your system to a manual setting?
an...@google.com <an...@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
Version used: 1.2.1
If you use a FragmentContainerView in an XML layout and use the layout preview, an error will be printed in the preview's errors view:
```
The following classes could not be instantiated:
- androidx.fragment.app.FragmentContainerView (Open Class, Show Exception, Clear Cache)
Tip: Use View.isInEditMode() in your custom views to skip code or show sample data when shown in the IDE. If this is an unexpected error you can also try to build the project, then manually refresh the layout.
Exception Details
java.lang.UnsupportedOperationException: FragmentContainerView must be within a FragmentActivity to be instantiated from XML.
at androidx.fragment.app.FragmentContainerView.<init>(FragmentContainerView.java:117)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.jetbrains.android.uipreview.ViewLoader.createNewInstance(ViewLoader.java:404)
(omitted)
```
It might be good to add a check for isInEditMode, or alternatively remove the constructor overloads that throw (since the default Context-only one doesn't throw).