0

I Followed this SO answer to fix, when Android studio was giving me error Gradle plugin is old , now there is tinny problem now i am getting error SAXParseException here is the message of error.

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'.

This is my build.gradle(Module: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(Project: Test):

// 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
}

I tried following SO answer fix and it didn't worked , i think there is something wrong or again updated ?

Community
  • 1
  • 1
Zulqurnain Jutt
  • 1,083
  • 3
  • 15
  • 41

2 Answers2

1

remove this

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

Example: In windows

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

Hope this helps

Zulqurnain Jutt
  • 1,083
  • 3
  • 15
  • 41
GvSharma
  • 2,632
  • 1
  • 24
  • 30
0

Removing both 23.0.0-preview/ (as gvsharma pointed out) and 23.0.0_rc1/ solved my issue.

Ex.

[root@cobalt Sdk]# ls
add-ons  build-tools  docs  extras  licenses  lldb  ndk-bundle  platforms  platform-tools  samples  SDK Readme.txt  sources  system-images  temp  tools
[root@cobalt Sdk]# cd build-tools/
[root@cobalt 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
[root@cobalt build-tools]# rm -rf 23.0.0-preview/
[root@cobalt build-tools]# rm -rf 23.0.0_rc1
mkc
  • 395
  • 4
  • 14