Android Textview变黑了

时间:2016-03-28 10:55:50

标签: java android textview

我不知道发生了什么。 我更改了graddle并更新了我的google-services.json文件。没什么大不了的。

经过几次构建后,我注意到,我的应用中的所有TextView都变黑了。我的意思是黑色文字颜色。你在xml中选择什么颜色并不重要,文字会是黑色的。如果你以编程方式设置它会改变,但xml没有机会。

未进行Java代码更改。你有什么想法发生了什么吗?非常感谢。 项目非常大,设置所有textfield的颜色programmaticaly将花费很多时间,并将降低应用程序的速度。 非常感谢你。

我的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"
        }
    }


}

1 个答案:

答案 0 :(得分:0)

styles.xml AppTheme

中添加以下行
<item name="android:textColor">Desired Color Code</item> 

让我知道它是否适合你