在构建应用程序时,我会看到以下错误:
Error:org.xml.sax.SAXParseException; lineNumber: 0; columnNumber: 0;
cvc-pattern-valid: Value 'build-tools;23.0.0 rc3'
is not facet-valid with respect to pattern '[a-zA-Z0-9_\-;.]+' for type 'segmentListType'.模块级级的build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "ms.demo.map"
minSdkVersion 9
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.google.android.gms:play-services-maps:8.4.0'
}即使在清除应用程序之后,错误仍然存在。包的结构与gradle文件中描述的applicationId不匹配。我正在使用最新版本的Android (2.0预览9)。
发布于 2016-01-31 15:17:03
错误本身清楚地解释了这里的错误:is not facet-valid with respect to pattern '[a-zA-Z0-9_\-;.]+' for type 'segmentListType'.
只需在之前删除apply plugin: 'com.android.application'空间并重新构建项目即可。
发布于 2016-02-10 05:57:51
在更新、AndroidStudio2.0beta 2、和gradle之后,我也遇到了同样的问题。如需解决方案,请按以下步骤执行

好了。
发布于 2016-02-06 04:50:27
在更新到最新的等级之后,我也遇到了这个问题。只需转到$ANDROID_HOME/build-tools/并删除23.0.0 rc3目录,修复错误。
https://stackoverflow.com/questions/35115114
复制相似问题