Android 属性";“边界宽度”;使用支持库设计v 23.1.1时已定义错误
我试图在同一个应用程序中结合使用导航抽屉和选项卡布局。但在尝试导入依赖项时,它给了我一个错误Android 属性";“边界宽度”;使用支持库设计v 23.1.1时已定义错误,android,navigation-drawer,android-tablayout,Android,Navigation Drawer,Android Tablayout,我试图在同一个应用程序中结合使用导航抽屉和选项卡布局。但在尝试导入依赖项时,它给了我一个错误属性borderWidth已定义。请在下面查找错误: 错误:(2)已定义属性“borderWidth” 我的预感是,这是由于版本冲突造成的。请参阅下面我的Gradle文件: apply plugin: 'com.android.application' android { compileSdkVersion 23 buildToolsVersion "23.0.0" packagingOptions
属性borderWidth已定义。请在下面查找错误:
错误:(2)已定义属性“borderWidth”
我的预感是,这是由于版本冲突造成的。请参阅下面我的Gradle文件:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.0"
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE-FIREBASE.txt'
exclude 'META-INF/NOTICE'
}
defaultConfig {
applicationId "com.iinspin.homeautomation"
minSdkVersion 16
targetSdkVersion 20
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
repositories {
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
repositories {
jcenter()
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':ToggleButtonLib')
compile files('libs/guava-18.0.jar')
compile files('libs/mpandroidchartlibrary-2-1-6.jar')
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:recyclerview-v7:23.1.1'
compile 'com.android.support:cardview-v7:23.1.1'
compile 'com.michaelpardo:activeandroid:3.1.0-SNAPSHOT'
compile 'org.adw.library:discrete-seekbar:1.0.0'
compile 'com.firebase:firebase-client-android:2.4.0'
compile 'com.firebase:firebase-ui:0.1.0'
compile 'com.google.android.gms:play-services-appindexing:8.1.0'
compile 'com.android.support:design:23.1.1'
}
还可以在下面找到我的布局文件:
<android.support.v4.widget.DrawerLayout
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:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:id="@+id/container_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<include
android:id="@+id/toolbar"
layout="@layout/toolbar" />
<android.support.design.widget.TabLayout
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabMode="scrollable"/>
</LinearLayout>
<FrameLayout
android:id="@+id/container_body"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="1" />
</LinearLayout>
<android.support.v4.view.ViewPager
android:id="@+id/viewpager"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="95dp"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
<fragment
android:id="@+id/fragment_navigation_drawer"
android:name="com.iinspin.homeautomation.Design.FragmentDrawer"
android:layout_width="@dimen/nav_drawer_width"
android:layout_height="match_parent"
android:layout_gravity="start"
app:layout="@layout/fragment_navigation_drawer"
tools:layout="@layout/fragment_navigation_drawer" />
将显示所有帮助。您需要使用全局搜索在attr.xml
中查找borderwidth。然后您可以重构它。这是因为支持libs和编译sdk版本之间的兼容性
版本为23>0
表示编译SDK必须为23或以上
请同时验证“ToggleButtonLib”您需要找出哪个库具有相同的属性,并在依赖项中重命名itCheck哪些库在attrs.xml中具有边框宽度如何查找attrs.xml文件您解决了这个问题吗?