相关疑难解决方法(0)

styles_base.xml文件出错 - android app - 找不到匹配给定名称'android:Widget.Material.ActionButton'的资源

好的,所以我是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 android-appcompat

52
推荐指数
5
解决办法
13万
查看次数

在'android.support.design'包中找不到属性'layoutManager'的资源标识符

我在项目中添加了'android.support.design'库作为依赖项

但发现了以下错误.

在'android.support.design'包中找不到属性'layoutManager'的资源标识符

在此输入图像描述

到目前为止我做了什么..

  1. 更新到最新的支持库版本
  2. 添加appcompat作为其依赖项("设计库")
  3. 将"设计库"检查为库模块

请帮忙.

android android-support-library

8
推荐指数
1
解决办法
7469
查看次数

android.support.design.widget.TextInputLayout无法实例化

我想android.support.design.widget.TextInputLayout在我的Android应用程序中集成.我已经将jar文件android-support-design.jar从sdk 复制到了我的应用程序li​​b文件夹.我在我的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)

我该如何解决这个问题......

java android android-textinputlayout

4
推荐指数
3
解决办法
2万
查看次数