ฉันได้กำหนดค่า CI สำหรับโปรเจ็กต์ Android ของฉันแล้ว
เซิร์ฟเวอร์ที่สร้างโครงการไม่มีการเข้าถึงอินเทอร์เน็ต ดังนั้นฉันจึงได้รับข้อผิดพลาดนี้:
IOException: https://dl.google.com/android/repository/addons_list-3.xml
java.net.ConnectException: Connection timed out (Connection timed out)
ที่เก็บทั้งหมดในไฟล์โปรเจ็กต์ build.gradle
ได้รับการประกาศดังนี้:
repositories {
maven("https://artifactory.mycompany.com/artifactory/jfrog-gradle-plugins")
maven("https://artifactory.mycompany.com/artifactory/maven-fabric")
maven("https://artifactory.mycompany.com/artifactory/remote-repos")
maven("https://artifactory.mycompany.com/artifactory/google-maven")
maven("https://artifactory.mycompany.com/artifactory/jcenter")
maven("https://artifactory.mycompany.com/artifactory/libs-android")
}
ข้อผิดพลาดนี้เริ่มต้นเมื่อฉันอัปเกรด Gradle Wrapper เป็น 6.1.1 และ Android Gradle Plugin 4.0.0
การเปลี่ยนแปลงหลักคือการเปลี่ยนแปลงที่อธิบายไว้ที่นี่:
https://docs.gradle.org/6.0/userguide/declaring_repositories.html#sec:supported_metadata_sources
..นั่นคือ ฉันเพิ่มตัวเลือกเหล่านี้ไปยังที่เก็บของฉันเนื่องจากฉันมีสิ่งประดิษฐ์/ไลบรารีที่ไม่มีไฟล์ pom.xml
metadataSources {
mavenPom()
artifact()
}
ดังนั้นฉันคิดว่าการเปลี่ยนแปลงข้างต้นทำให้ Gradle Plugin พยายามดาวน์โหลดบางอย่าง
https://dl.google.com/android/repository/addons_list-3.xml
แต่ฉันไม่สามารถยืนยันได้ว่านั่นคือสาเหตุ