android studio创建一个工程时候报错
2015-06-12 16:03
543 查看
最近下了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中的代码有问题:
应该在Theme前面加上Base.
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中几种常用的Dialog
- 快速掌握Android三个常用自定义控件Toast AlertDialog Notification
- 浅谈JAVA反射机制在Android应用开发中的应用
- Android设计模式(十二)--抽象工厂模式
- android avd sdk root
- Android 使用SQLite
- Android自动化测试之MonkeyRunner
- Android_ContentProvider详解
- Android打包之bat脚本打包
- Android存储访问及目录
- android 生成 Bitmap 的常用几种方式
- Android - View绘图原理总结
- Android SimpleAdapter
- Android中XML文件的三种解析方式
- Android调用本地WebService
- [Android算法] Android蓝牙开发浅谈
- Android: 屏幕截图
- Android的进程回收机制
- 基于 vlc android截图录制视频等功能
- android获取手机Imei码