1.新建的项目没有改配置的情况下点击这个snyc的时候·报错(Failed to resolve),编译会警告,拟引入的项目无法解析
在没配置代理无法科学上网的情况下我们在settings.gradle里加入下面的
pluginManagement {
repositories {
maven { url 'https://maven.aliyun.com/repository/public' }
maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
maven { url 'https://maven.aliyun.com/repository/central' }
maven { url 'https://maven.aliyun.com/repository/google' }
gradlePluginPortal()
google()
mavenCentral()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
maven { url 'https://maven.aliyun.com/repository/public' }
maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
maven { url 'https://maven.aliyun.com/repository/central' }
maven { url 'https://maven.aliyun.com/repository/google' }
google()
mavenCentral()
}
}
rootProject.name = "Rftools"
include ':app'
继续报错
refreshLayout.setOnRefreshListener(new OnRefreshListener() {
^
找不到android.support.v4.view.NestedScrollingParent的类文件
在gradle.properties文件里加上再snyc
android.enableJetifier=true
最后成功