Android Studio 的渲染问题
Rendering problems with Android Studio
我试过几次使用 Android Studio。
每次我在 AVD 上运行我的示例代码时,它都会给我一个 "Rendering problems" 和一些规范:
Rendering Problems The following classes could not be instantiated:
- android.support.design.widget.CoordinatorLayout (Open Class, Show Exception, Clear Cache)
- android.support.design.widget.AppBarLayout (Open Class, Show Exception, Clear Cache)
- android.support.design.widget.FloatingActionButton (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
Exception Details java.lang.IllegalArgumentException: You need to use
a Theme.AppCompat theme (or descendant) with the design library. at
android.support.design.widget.ThemeUtils.checkAppCompatTheme(ThemeUtils.java:34)
at
android.support.design.widget.CoordinatorLayout.(CoordinatorLayout.java:178)
at
android.support.design.widget.CoordinatorLayout.(CoordinatorLayout.java:172)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at
android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
at android.view.LayoutInflater.inflate(LayoutInflater.java:492) at
android.view.LayoutInflater.inflate(LayoutInflater.java:394) Copy
stack to clipboard Failed to find the style corresponding to the id
2147418374 (3 similar errors not shown)
我想知道为什么在我启动模拟器设备后总是出现这种情况?
我该怎么做才能解决这个问题?
这个问题的答案在这里:
但是,我还是想知道错误消息中的所有这些是什么意思...
我试过几次使用 Android Studio。
每次我在 AVD 上运行我的示例代码时,它都会给我一个 "Rendering problems" 和一些规范:
Rendering Problems The following classes could not be instantiated: - android.support.design.widget.CoordinatorLayout (Open Class, Show Exception, Clear Cache) - android.support.design.widget.AppBarLayout (Open Class, Show Exception, Clear Cache) - android.support.design.widget.FloatingActionButton (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 Exception Details java.lang.IllegalArgumentException: You need to use a Theme.AppCompat theme (or descendant) with the design library. at android.support.design.widget.ThemeUtils.checkAppCompatTheme(ThemeUtils.java:34) at android.support.design.widget.CoordinatorLayout.(CoordinatorLayout.java:178) at android.support.design.widget.CoordinatorLayout.(CoordinatorLayout.java:172) at java.lang.reflect.Constructor.newInstance(Constructor.java:422) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704) at android.view.LayoutInflater.inflate(LayoutInflater.java:492) at android.view.LayoutInflater.inflate(LayoutInflater.java:394) Copy stack to clipboard Failed to find the style corresponding to the id 2147418374 (3 similar errors not shown)
我想知道为什么在我启动模拟器设备后总是出现这种情况?
我该怎么做才能解决这个问题?
这个问题的答案在这里:
但是,我还是想知道错误消息中的所有这些是什么意思...