我在构建项目的appcompat-v7库中遇到以下错误.
Error:(380, 5) String types not allowed (at 'blue' with value '').\app\build\intermediates\exploded-aar\com.androID.support\appcompat-v7.1.1\res\values\values.xml
appcompat-v7库values.xml文件发生此错误:
<!-- this line --> <style name="Base.TextAppearance.AppCompat.SearchResult" parent=""> <item name="androID:textStyle">normal</item> <item name="androID:textcolor">?androID:textcolorPrimary</item> <item name="androID:textcolorHint">?androID:textcolorHint</item> </style>
我有最新版本的AndroID Studio(2.0 PrevIEw 7)和appcompat-v7库.
的build.gradle:
apply plugin: 'com.androID.model.application'model { androID { compileSdkVersion 23 buildToolsversion "23.0.2" defaultConfig.with { applicationID "com.ms.sensors" minSdkVersion.APILevel 7 targetSdkVersion.APILevel 23 versionCode 1 versionname "1.0" } compileOptions.with { sourceCompatibility = JavaVersion.VERSION_1_7 targetCompatibility = JavaVersion.VERSION_1_7 } buildTypes { release { MinifyEnabled = false proguardfiles.add(file('proguard-rules.txt')) } } } androID.ndk { modulename = "sensorgraph" cppFlags.add("-Werror") ldlibs.addAll(["log", "GLESv2", "androID"]) stl = "c++_static" } androID.productFlavors { create("arm7") { ndk.abiFilters.add("armeabi-v7a") } create("arm8") { ndk.abiFilters.add("arm64-v8a") } create("x86-32") { ndk.abiFilters.add("x86") } // for detailed abiFilter descriptions, refer to "Supported ABIs" @ // https://developer.androID.com/ndk/guIDes/abis.HTML#sa // build one including all cpu architectures create("all") }}dependencIEs { // compile filetree(dir: 'libs', include: ['*.jar']) compile 'com.androID.support:appcompat-v7:23.1.1' compile 'com.androID.support:support-v4:23.1.1' compile 'com.androID.support:design:23.1.1' compile 'com.androID.support:cardvIEw-v7:23.1.1' compile 'com.androID.support:recyclervIEw-v7:23.1.1'}
我的style.xml:
<resources> <style name="Apptheme" parent="theme.AppCompat.light.DarkActionbar"> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorAccent">@color/colorAccent</item> </style></resources>
解决方法:
您将空值分配给’蓝色’
打开color.xml然后搜索“blue”并检查指定的颜色
<?xml version="1.0" enCoding="utf-8"?><resources> <color name="blue"></color> <!-- must add valID value --></resources>
总结 以上是内存溢出为你收集整理的android – 不允许字符串类型(‘blue’与值”)全部内容,希望文章能够帮你解决android – 不允许字符串类型(‘blue’与值”)所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)