2016-02-12 65 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