2016-02-12 99 views
0

我跟着this SO answer修复,当Android的工作室给我的错误摇篮插件是老,现在有自带的问题,现在我得到错误的SAXParseException这里是错误的消息。摇篮生成错误或错误Android Studio中

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(模块:APP)

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 22 
    buildToolsVersion "23.0.2" 

    defaultConfig { 
     applicationId "com.jutt.fyp.isec" 
     minSdkVersion 14 
     targetSdkVersion 22 
     versionCode 1 
     versionName "1.0" 
    } 
    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 
    } 
} 

dependencies { 
    compile fileTree(dir: 'libs', include: ['*.jar']) 
    testCompile 'junit:junit:4.12' 
    compile 'com.android.support:appcompat-v7:22.2.1' 
} 

的build.gradle(项目:测试)

// Top-level build file where you can add configuration options common to all sub-projects/modules. 

buildscript { 
    repositories { 
     jcenter() 
    } 
    dependencies { 
     classpath 'com.android.tools.build:gradle:2.0.0-beta4' 

     // NOTE: Do not place your application dependencies here; they belong 
     // in the individual module build.gradle files 
    } 
} 

allprojects { 
    repositories { 
     jcenter() 
    } 
} 

task clean(type: Delete) { 
    delete rootProject.buildDir 
} 

我尝试以下SO answer fix并没有奏效,我认为有什么不对或再次更新?

+0

尝试buildToolsVersion '23 .0.2' ,而不是buildToolsVersion “23.0.2” – Chol

+0

没有影响,同样的错误 –

回答

1

删除这个

$ANDROID_HOME/build-tools/and remove the 23.0.0-preview directory fixed the errors. 

示例:在窗口

C:\Users\Sharma\Desktop\xxx\Android\sdk\build-tools 

希望这有助于

+0

没有** 23.0.0-RC3 **,还有** 23.0.0预览**和** 23.0.2 **文件夹。 –

+0

我应该删除这些吗?上文提到的? –

+0

只删除23.0.0-preview,让我知道这 – GvSharma

0

卸下既23.0.0预览/(作为gvsharma指出)和23.0.0_rc1 /解决了我的问题。

Ex。

[[email protected] Sdk]# ls 
add-ons build-tools docs extras licenses lldb ndk-bundle platforms platform-tools samples SDK Readme.txt sources system-images temp tools 
[[email protected] Sdk]# cd build-tools/ 
[[email protected] build-tools]# ls 
17.0.0 18.0.1 18.1.0 18.1.1 19.0.1 19.0.2 19.0.3 19.1.0 20.0.0 21.0.0 21.0.1 21.0.2 21.1.2 22.0.1 23.0.0-preview 23.0.0_rc1 23.0.1 23.0.2 android-4.4 android-4.4W 
[[email protected] build-tools]# rm -rf 23.0.0-preview/ 
[[email protected] build-tools]# rm -rf 23.0.0_rc1