Kyle Griffith Kyle Griffith - 1 year ago 147
Android Question

failed to sync grade project

After adding this line to my 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.2.2'
// in the individual module build.gradle files
compile "com.android.support:support-core-utils:25.0.1"

}
}

allprojects {
repositories {
jcenter()
}
}

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


And syncing gradle file. I get this error
Error

Then I follow the link to open Android SDK Manager and I find that I have already installed Android Suport Repository

Showing I have installed Android Support Repository

The reason I am adding this file to my grade is because it has been posted that this will solve my initial error where

Cannot resolve symbol 'TabsPagerAdapter'

Answer Source

this line: compile "com.android.support:support-core-utils:25.0.1" goes inside the other build.gradle file.. you are adding it on the main build.gradle, you should add that inside the specific gradle file for your app module.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download