【发布时间】:2019-02-06 10:17:05
【问题描述】:
我正在尝试使用 android 底部导航抽屉,但遇到了一些问题。
这是我项目的 Gradle 文件:
当我将 v28 库与 dexter 一起使用时,我遇到了一些冲突,并且可能与改造一起使用,因此我添加了这些行:
*implementation 'com.android.support:support-media-compat:28.0.0-rc01'
implementation 'com.android.support:support-v4:28.0.0-rc01'*
和{ 排除模块:'appcompat-v7' 排除组:'com.android.support' }
部分。
这是我的布局:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<android.support.design.widget.BottomNavigationView
android:id="@+id/bottom_navigation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
app:itemBackground="@color/colorPrimary"
app:itemIconTint="@color/accent_white"
app:itemTextColor="@color/bottom_nav_text"
app:menu="@menu/bottom_navigation_main" />
</RelativeLayout>
错误说明:未找到属性 itemBackground、itemIconTint、itemTextColor、菜单。请帮我解决这个问题。
一个示例:错误:找不到属性“com.app.abc.xyz:itemBackground”。 提前致谢。
【问题讨论】:
-
您需要以
TEXT而不是IMAGE的身份分享您的布局和错误 -
我希望问题的最后一行说明了这一点!
标签: android android-layout android-studio android-gradle-plugin gradle-plugin