gpt4 book ai didi

android - API 级别 23 的样式错误

转载 作者:行者123 更新时间:2023-11-30 01:52:43 24 4
gpt4 key购买 nike

一旦我将我的 build.grade 文件更新到 API 级别 23,我就会收到无法定位且无法修复的错误。但是,这些相同的错误不会出现在 22 或 21 中。出现的错误是:

属性“titleTextColor”已被定义,出于某种原因,它突出显示了 colors.xml 文件。我的整个项目中没有 titleTextColor 实例。当我在项目范围内进行 (cmd + shift + f) 搜索时,titleTextColor 的唯一实例出现在生成的构建文件中。这是怎么回事,我该如何解决?

[编辑] build.grade 文件

apply plugin: 'android-sdk-manager'
apply plugin: 'com.android.application'
apply plugin: 'play'

repositories {
//ViewPagerIndicator AAR packaged
maven {
url 'http://dl.bintray.com/populov/maven'
}
jcenter()
flatDir {
dirs 'libs'
}
}

android {

compileSdkVersion 23
buildToolsVersion "23.0.1"

defaultConfig {
minSdkVersion 16
targetSdkVersion 23

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}

publishingConfigs {

}

signingConfigs {

basicRelease {

}

advancedRelease {

}

debug {
storeFile file('publish/debug.keystore')
}
}

productFlavors {

basic {
applicationId "com.basic"
versionCode 1
versionName "1.0.0"
}

advanced {
applicationId "com.advanced"
versionCode 2
versionName "1.0.1"
}
}


packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'LICENSE.txt'
}

buildTypes {
debug {
applicationIdSuffix ".debug"
}

release {

}
}

lintOptions {
abortOnError true

htmlReport true

checkAllWarnings true
warningsAsErrors true
}

configurations {
all*.exclude group: 'com.google.android', module: 'support-v4'
all*.exclude group: 'com.google.android', module: 'support-v13'
}

dependencies {
compile 'com.android.support:support-v13:23.0.+'
compile 'com.android.support:appcompat-v7:23.0.+'
compile 'commons-httpclient:commons-httpclient:3.1'

compile 'com.google.android.gms:play-services:7.8.0'
compile 'joda-time:joda-time:2.3'
compile 'org.ocpsoft.prettytime:prettytime:3.2.1.Final'
compile 'com.facebook.android:facebook-android-sdk:3.23.0'
//https://github.com/weddingparty/AndroidFloatLabel
compile ':float-label:1.2.1.0@aar'

//Forked from https://github.com/inmite/android-styled-dialogs
compile 'eu.inmite.android.lib:android-styled-dialogs:1.2.0'

compile 'com.viewpagerindicator:library:2.4.1@aar'
compile 'com.makeramen:roundedimageview:1.2.1'
compile 'com.squareup.dagger:dagger:1.2.2'
provided 'com.squareup.dagger:dagger-compiler:1.2.2'
compile 'com.squareup.retrofit:retrofit:1.9.0'
debugCompile 'com.squareup.retrofit:retrofit-mock:1.9.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.squareup.okhttp:okhttp:2.3.0'
compile('com.squareup.okhttp:okhttp-urlconnection:2.3.0') {
exclude(group: 'com.squareup.okhttp', module: 'okhttp')
}
compile 'com.squareup.okio:okio:1.3.0'
compile 'io.reactivex:rxandroid:0.24.0'
compile 'info.metadude.android:typed-preferences:2.0.0'
compile 'org.apache.commons:commons-lang3:3.3.2'
compile 'commons-io:commons-io:2.4'
compile 'com.crittercism:crittercism-android-ndk-agent:5.0.6'
compile 'com.jakewharton:butterknife:6.1.0'
compile('com.segment.analytics.android:analytics-core:3.0.2@aar') {
transitive = true
}

compile 'pl.charmas.android:android-reactive-location:0.5@aar'
compile 'com.github.amlcurran.showcaseview:showcaseview:5.1.1@aar'
compile files('libs/appsflyer-2.3.1.16.jar')
debugCompile 'com.jakewharton.madge:madge:1.1.1'
debugCompile 'com.jakewharton.scalpel:scalpel:1.1.1'
androidTestCompile 'com.android.support.test:testing-support-lib:0.1'
androidTestCompile('com.android.support.test.espresso:espresso-core:2.0') {
exclude group: 'javax.inject'
}
compile files('libs/comscore.jar')
}

最佳答案

从错误来看,您的依赖项之一“titleTextColor”属性似乎已经被定义。

例如,这个流行的方形图书馆有一个开放的票:

https://github.com/square/android-times-square/issues/226

因此,请删除罪魁祸首的库,或者以防万一,如果您需要该库,则需要恢复到 API 22。

希望这对您有所帮助。

关于android - API 级别 23 的样式错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32769534/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com