未能同步成绩项目

时间:2016-11-23 20:35:51

标签: android build.gradle

将此行添加到我的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
} 

同步gradle文件。我收到这个错误 Error

然后我按照链接打开Android SDK Manager,发现我已经安装了Android Suport存储库

Showing I have installed Android Support Repository

我将此文件添加到我的成绩的原因是因为已经发布了这将解决我的初始错误

 Cannot resolve symbol 'TabsPagerAdapter'

1 个答案:

答案 0 :(得分:2)

这一行:compile "com.android.support:support-core-utils:25.0.1"进入另一个build.gradle文件..你将它添加到主build.gradle上,你应该在你的app模块的特定gradle文件中添加它。