好的,所以我是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) 我在项目中添加了'android.support.design'库作为依赖项
但发现了以下错误.
在'android.support.design'包中找不到属性'layoutManager'的资源标识符
到目前为止我做了什么..
请帮忙.
我想android.support.design.widget.TextInputLayout在我的Android应用程序中集成.我已经将jar文件android-support-design.jar从sdk 复制到了我的应用程序lib文件夹.我在我的xml文件中为Email EditText添加了以下代码,
<!-- Email Label -->
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp">
<EditText android:id="@+id/input_email"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textEmailAddress"
android:hint="Email" />
</android.support.design.widget.TextInputLayout>
Run Code Online (Sandbox Code Playgroud)
在我的layout.xml文件中添加此代码时,我收到一个错误,如,
Exception raised during rendering: com.android.layoutlib.bridge.MockView cannot be cast to android.view.ViewGroup
Exception details are logged in Window > Show View > Error Log
The following classes could not be instantiated:
- android.support.design.widget.TextInputLayout (Open Class, Show Error Log)
See the Error Log (Window > Show View) for more details.
Run Code Online (Sandbox Code Playgroud)
我该如何解决这个问题......