Android布局文件中android:textColor属性失效问题

来源:互联网 发布:cn域名个人备案 编辑:程序博客网 时间:2024/05/17 06:36

最近刚刚更新了最新的Android2.2,用着感觉是快点了 但是出了一问题:
就是我新建一个工程后,布局文件中android:textColor的属性失效了 ,但是在代码中设置就可以,于是乎就查找原因,后来发现是我引用包的问题:
新工程默认:

    compileSdkVersion 23    buildToolsVersion "23.0.3"

引用包:

dependencies {    compile fileTree(include: ['*.jar'], dir: 'libs')    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {        exclude group: 'com.android.support', module: 'support-annotations'    })    testCompile 'junit:junit:4.12'    compile 'com.android.support:appcompat-v7:24.0.0-alpha1'    compile 'com.flyco.tablayout:FlycoTabLayout_Lib:2.0.8@aar'    compile files('libs/hyphenatechat_3.1.5.jar')    compile 'com.android.support:support-v4:24.0.0-alpha1'}

compileSdkVersion 23但是引用的包都是24的
所以引用包改为:

dependencies {    compile fileTree(include: ['*.jar'], dir: 'libs')    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {        exclude group: 'com.android.support', module: 'support-annotations'    })    testCompile 'junit:junit:4.12'    compile 'com.flyco.tablayout:FlycoTabLayout_Lib:2.0.8@aar'    compile files('libs/hyphenatechat_3.1.5.jar')    compile 'com.android.support:appcompat-v7:23.1.1'    compile 'com.android.support:support-v4:23.1.1'}

改为23就好了

0 0
原创粉丝点击