ในแอปพลิเคชัน Android
ฉันอัปเดต Android Studio เป็นเวอร์ชันล่าสุด (3.6.1)
ตอนนี้เมื่อทำการซิงค์ Gradle ปลั๊กอิน Gradle ไม่พบข้อผิดพลาดดังต่อไปนี้:
เกิดจาก: org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration $ ArtifactResolveException $: ไม่สามารถแก้ไขไฟล์ทั้งหมดสำหรับการกำหนดค่า ': classpath'
และ
เกิดจาก: org.gradle.internal.resolve.ModuleVersionNotFoundException: ไม่พบ com.android.tools.build:gradle:3.0.0
มันทำให้ฉันบ้าเพราะฉันเปลี่ยน Gradle Version และ Gradle Plugin Version เป็นความเป็นไปได้อื่น ๆ แต่ก็ไม่พบ Gradle Plugin ที่มีข้อผิดพลาดเดียวกันอีกครั้ง
ไฟล์ Build.Gradle:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
}
}
allprojects {
repositories {
jcenter()
google()
maven { url "https://jitpack.io" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
และ Gradle.Wrappers.Properties ไฟล์:
#Thu Mar 05 15:41:52 IRST 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
แก้ไข:
ฉันเพิ่มข้อมูลต่อไปนี้ด้วย:
รุ่นคอมไพล์ Sdk: 25
เครื่องมือสร้างรุ่น: 25.0.3