android文本视图变黑了

4xrmg8kj  于 2021-07-13  发布在  Java
关注(0)|答案(1)|浏览(299)

我不知道发生了什么。我更改了graddle并更新了google-services.json文件。没什么大不了的。
经过几次构建后,我注意到我应用程序中的所有textview都变黑了。我是说黑色文字颜色。在xml中选择什么颜色无关紧要,文本将是黑色的。如果您以编程方式设置它,它将改变,但是使用xml则没有机会。
没有对java代码进行任何更改。你知道发生了什么事吗。非常感谢。项目非常大,设置所有textfield的颜色程序将花费大量时间,并会降低应用程序的速度。非常感谢你。
我的gradle档案

apply plugin: 'com.android.application'

android {
    signingConfigs {
        config {

        }
    }
    compileSdkVersion 'Google Inc.:Google APIs:23'
    buildToolsVersion '23.0.2'
    defaultConfig {
        multiDexEnabled true
        applicationId "com.example.ykemer.autogeorgia"
        minSdkVersion 15
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
        renderscriptTargetApi 23
        renderscriptSupportModeEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
        debug {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    packagingOptions {
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE.txt'
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support:appcompat-v7:24.0.0-alpha1'
    compile 'com.android.support:support-annotations:24.0.0-alpha1'
    compile 'com.android.support:recyclerview-v7:24.0.0-alpha1'
    compile 'org.apache.commons:commons-lang3:3.0'
    compile 'com.google.android.gms:play-services-ads:8.4.0'
    compile 'com.google.android.gms:play-services-analytics:8.4.0'
    compile 'com.google.android.gms:play-services-gcm:8.4.0'
    compile 'com.android.support:design:24.0.0-alpha1'
    compile 'com.davemorrissey.labs:subsampling-scale-image-view:3.4.1'
    compile 'com.facebook.android:facebook-android-sdk:4.+'
}

第二个

buildscript {
    repositories {
        jcenter()

    }

    dependencies {
        classpath 'com.android.tools.build:gradle:1.5.0'
        classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2'
        classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
    }
}

allprojects {
    repositories {
        jcenter()
        mavenCentral()
        maven {
            url "https://repo.commonsware.com.s3.amazonaws.com"
        }
    }

}
ruoxqz4g

ruoxqz4g1#

在styles.xml的主题中添加下面一行

<item name="android:textColor">Desired Color Code</item>

如果对你有用就告诉我

相关问题