Zion Q
Zion Q

Reputation: 95

Gradle sync failed: Expected BEGIN_ARRAY but was STRING at line 1 column 1 p

While using Android Studio 3.0 (canay7) my computer crashed. I restarted Windows and Android Studio.

My project Gradle sync failed and is now showing the message:

"Expected BEGIN_ARRAY but was STRING at line 1 column 1 p".

The point is that I have never changed my Gradle files.

I've invalidated caches and restarted Android Studio, but it didn't work. I have no idea what caused this problem. Can anyone help me?

Here's my Gradle file:

    // 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:3.0.0-alpha7'
//        classpath 'com.android.tools.build:gradle:2.3.0'
        // 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
}

Upvotes: 3

Views: 2043

Answers (2)

Saeed Ahmed
Saeed Ahmed

Reputation: 88

Just clean app Step 1 go to Build Step 2 clean project

its work perfectly

Upvotes: -2

Patrick Prakash
Patrick Prakash

Reputation: 598

Try to Clean Build the Project.It worked for Me

Happy Coding

Upvotes: 5

Related Questions