2016-03-28 69 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

不幸的是沒有。 –