2016-03-28 66 views
1

我不知道发生了什么。 我改变了分级和更新我的google-services.json文件。不严重。Android Textview变黑

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

没有进行Java代码更改。你有什么想法发生了什么。非常感谢。 项目非常大,设置所有文本字段的颜色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" 
     } 
    } 


} 
+0

在您的styles.xml中,尝试在应用程序主题内添加#124578并检查 –

+0

这会将每个文本都更改为此颜色。必须是一些分级更新错误,昨天有同样的问题,无法弄清楚。 – Enpi

+0

您从以前的版本中所做的更改是什么?检查您的备份文件,以便您可以在那里找到任何问题 –

回答

0

添加下面一行在你styles.xml的AppTheme

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

,让我知道,如果它为你工作

+0

不幸的是没有。 –