好的,所以我是android开发的初学者,我刚创建了hello world app.但是它给了我库中styles_base.xml文件的错误appcompat_v7.
错误:检索项目的父项时出错:找不到与给定名称"android:Widget.Material.ActionButton"匹配的资源.styles_base.xml/appcompat_v7/res/values-v21
AAPT问题
我该如何处理这个错误?另外,为什么我不想要appcompat_v7库?我的意思是如何在不使用appcompat_v7库的情况下创建hello world应用程序?
这是styles_base.xml给出上述错误的文件.
<resources>
<!-- Like in themes_base.xml, the namespace "*.AppCompat.Base" is used to
define base styles for the platform version. The "*.AppCompat"
variants are for direct use or use as parent styles by the app. -->
<eat-comment/>
<style name="Base.Widget.AppCompat.ActionBar.TabView"
parent="android:Widget.Material.ActionBar.TabView">
</style>
<style name="Base.Widget.AppCompat.Light.ActionBar.TabView"
parent="android:Widget.Material.Light.ActionBar.TabView">
</style>
<style name="Base.Widget.AppCompat.ActionBar.TabText"
parent="android:Widget.Material.ActionBar.TabText">
</style>
<style name="Base.Widget.AppCompat.Light.ActionBar.TabText"
parent="android:Widget.Material.Light.ActionBar.TabText">
</style>
<style name="Base.Widget.AppCompat.Light.ActionBar.TabText.Inverse"
parent="android:Widget.Material.Light.ActionBar.TabText">
</style>
<style name="Base.TextAppearance.AppCompat.Widget.ActionBar.Menu"
parent="android:TextAppearance.Material.Widget.ActionBar.Menu">
</style>
<style name="Base.TextAppearance.AppCompat.Widget.ActionBar.Title"
parent="android:TextAppearance.Material.Widget.ActionBar.Title">
</style>
<style name="Base.TextAppearance.AppCompat.Widget.ActionBar.Subtitle"
parent="android:TextAppearance.Material.Widget.ActionBar.Subtitle"> …Run Code Online (Sandbox Code Playgroud) 所以我是Haskell的新手,我正在编写一个基本函数,它将3个整数作为参数并返回多少是相等的.
howManyEqual :: Int->Int->Int->Integer
howManyEqual x y z =
if x == y && x == z then return 3
else if x == y && x /= z then return 2
else if x == z && x /= y then return 2
else if y == z && y /= x then return 2
else return 0
Run Code Online (Sandbox Code Playgroud)
但我得到以下错误:
Prelude> :load ex4.1_2.hs
[1 of 1] Compiling Main ( ex4.1_2.hs, interpreted )
ex4.1_2.hs:11:34:
Couldn't match expected type ‘Integer’
with actual …Run Code Online (Sandbox Code Playgroud)