其实软件就是 SS ,想学习安卓,看看这东西是怎么写的。
想预览一下 layout ,总是报错:
Rendering Problems Missing styles.
Is the correct theme chosen for this layout?
Use the Theme combo box above the layout to choose a different layout, or fix the theme style references.
NOTE: One or more layouts are missing the layout_width or layout_height attributes. These are required in most layouts.
Or: Automatically add all missing attributes
The following classes could not be found:
- android.support.v7.widget.Toolbar (Fix Build Path, Edit XML, Create Class)
Tip: Try to build the project.
Couldn't resolve resource @
style/ThemeOverlay.AppCompat.Dark.ActionBar (3 similar errors not shown) Failed to find style 'switchStyle' in current theme (18 similar errors not shown) Exception raised during rendering: Color value '?android:attr/textColorSecondary' must start with # (Details) (2 similar errors not shown)
尝试 Make 也会出现类似的错误:
Error retrieving parent for item: No resource found that matches the given name 'TextAppearance.Widget.AppCompat.Toolbar.Title'.
Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.NoActionBar'.
Error: No resource found that matches the given name: attr 'colorAccent'.
...后面还有十多个一样的错误
等等都是类似这样的问题,用的是 API 23 , java1.8
查了一下,发现这个 AppCompat 是 API7 的东西, SDK 工具里面我也安装了 Android Support Library
~/Library/Android/sdk/extras/android/support/v7/ 里面也是有 appcompat
那么我怎么才能把它导进去呢?试了几种方法都依旧出错
谢谢