您好,我有一个React Native应用,希望获得APK。我使用gradlew assembleRelease命令,但失败并显示错误:
Could not resolve all files for configuration ':@react-native-mapbox-gl_maps:lintClassPath'.
> Could not find lint-gradle.jar (com.android.tools.lint:lint-gradle:26.3.1).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-gradle/26.3.1/lint-gradle-26.3.1.jar
> Could not find lint.jar (com.android.tools.lint:lint:26.3.1).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint/26.3.1/lint-26.3.1.jar
> Could not find lint-checks.jar (com.android.tools.lint:lint-checks:26.3.1).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-checks/26.3.1/lint-checks-26.3.1.jar
> Could not find lint-api.jar (com.android.tools.lint:lint-api:26.3.1).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-api/26.3.1/lint-api-26.3.1.jar
> Could not find intellij-core.jar (com.android.tools.external.com-intellij:intellij-core:26.3.1).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/external/com-intellij/intellij-core/26.3.1/intellij-core-26.3.1.jar
> Could not find kotlin-compiler.jar (com.android.tools.external.com-intellij:kotlin-compiler:26.3.1).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/external/com-intellij/kotlin-compiler/26.3.1/kotlin-compiler-26.3.1.jar
> Could not find uast.jar (com.android.tools.external.org-jetbrains:uast:26.3.1).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/external/org-jetbrains/uast/26.3.1/uast-26.3.1.jar
我该如何解决这个问题,我什至尝试在gradle.properties上设置代理,但没有成功。 我的项目gradle如下:
buildscript {
ext {
buildToolsVersion = "28.0.3"
//buildToolsVersion = "23.0.1"
minSdkVersion = 16
compileSdkVersion = 28
targetSdkVersion = 28
supportLibVersion = "28.0.0"
}
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
// mavenCentral()
mavenCentral()
google()
jcenter()
maven { url 'https://maven.google.com' }
maven { url "https://jitpack.io" }
maven {
url "$rootDir/../node_modules/react-native/android"
}
}
}
subprojects {
afterEvaluate {project ->
if (project.hasProperty("android")) {
android {
compileSdkVersion 28
buildToolsVersion "28.0.3"
}
}
}
}
我还尝试了vpn下载它们,有什么帮助吗?