最近下了android studio,创建第一工程时候就报错(如下):
Rendering Problems The following classes could not be instantiated:
- android.support.v7.internal.widget.ActionBarOverlayLayout (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.ClassNotFoundException: android.support.v4.view.ViewPropertyAnimatorListener Copy stack to clipboard
从上面信息感觉是库文件缺少,最后弄了很久,才明白,其实问题很简单:在你工程文件style.xml中的代码有问题:
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
</style>
应该在Theme前面加上Base.
<!-- Base application theme. -->
<style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
</style>
本文将解决使用Android Studio创建第一个工程时遇到的渲染问题,错误提示为无法实例化指定类。通过检查并修改style.xml文件中的代码,解决了在主题设置中出现的ClassNotFoundException错误。
987

被折叠的 条评论
为什么被折叠?



