Strong problem description:
In the preview of the xml corresponding to the activity in Android Studio, the layout design is not displayed properly, which gives an error.
The following classes cannot be instantiated:
– android.support.v7.widgetActionBarContainer (Open Class, Show Exception, Clear Cache)
– android.support.v7.widgetActionBarContextView (Open Class, Show Exception, Clear Cache)
– android.support.v7.appWindowDecorActionBar(open class, show exception, clear cache)
Tip: Use View.isInEditMode() in a custom view to skip code or display sample data in the IDE.
If this is an unexpected error, you can also try building the project and then manually refreshing the layout
Forced Modification Method:
In the style resource file, the
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
</style>
is changed to:
<style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">
</style>
then the test will show the corresponding layout!
Read More:
- Activity of Android studio_ main.xml Unable to preview (gray page)
- [solved] not found android.support .v7. internal.app.WindowDecorActionbar
- Android studio prompt: failed to instance one or more classes appcompattextview
- [Solved] Resource style/Theme.AppCompat.Light.NoActionBar failed linking
- Error record: this.requestWindowFeature ( Window.FEATURE_ NO_ Title) error or no effect
- Android solves the gliding problem of EditText
- How to remove the title bar (using the request window feature)( Window.FEATURE_ NO_ Title); why it fails)
- How to keep textview and ImageView on the same line
- Android layout: layer layout
- After unity connects with androidstudio, unity packages APK with an error: commandinvocationfailure: failed to re package resources
- AppCompat does not support the current theme features
- How to use Android android:supportsRtl attribute
- Rendering Problems :Failed to load platform rendering library
- Modifying the default style of scrollbar in Android
- [error record] kotlin code compilation error when Android studio compiles (process @ nonnull parameter when upgrading support library)
- Failed to resolve: com.github
- Android error reporting: error inflating class android.webkit.WebView
- E / Art: failed sending reply to debugger: a solution to broken pipe
- Android project error: could not resolve com.android.support .c onstraint:constraint-layout :2.0.2.
- Error:Execution failed for task ‘: app:transformDexArchiveWithExternalLibsDexMergerForDebug The solution