서클 C에서 com.android.tools.build:gradle:3.0.0-alpha1을 찾을 수 없습니다.
gradle 플러그인을 최신으로 업데이트하면 com.android.tools.build:gradle:3.0.0-alpha1
이 오류가 발생합니다.
export TERM="dumb"
if [ -e ./gradlew ]; then ./gradlew test;else gradle test;fi
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'Android-app'. Could not
resolve all dependencies for configuration ':classpath'. Could not
find com.android.tools.build:gradle:3.0.0-alpha1. Searched in the
following locations:
https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0-alpha1/gradle-3.0.0-alpha1.pom
https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0-alpha1/gradle-3.0.0-alpha1.jar
Required by:
현재 circle.yml
dependencies:
pre:
- mkdir -p $ANDROID_HOME"/licenses"
- echo $ANDROID_SDK_LICENSE > $ANDROID_HOME"/licenses/android-sdk-license"
- source environmentSetup.sh && get_android_sdk_25
cache_directories:
- /usr/local/android-sdk-linux
- ~/.android
- ~/.gradle
override:
- ./gradlew dependencies || true
test:
post:
- mkdir -p $CIRCLE_TEST_REPORTS/junit/
- find . -type f -regex ".*/target/surefire-reports/.*xml" -exec cp {} $CIRCLE_TEST_REPORTS/junit/ \;
machine:
java:
version: oraclejdk8
편집 : 내 gradle 파일 :
buildscript {
repositories {
jcenter()
maven {
url 'https://maven.google.com'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0-alpha1'
classpath 'com.google.gms:google-services:3.0.0'
classpath "io.realm:realm-gradle-plugin:3.1.3"
}
}
allprojects {
repositories {
mavenCentral()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Google에는 새로운 maven 저장소가 있으므로 그 이유가 될 수 있습니다.
https://android-developers.googleblog.com/2017/10/android-studio-30.html > Google Maven 리포지토리 섹션
https://developer.android.com/studio/preview/features/new-android-plugin-migration.html https://developer.android.com/studio/build/dependencies.html#google-maven
따라서 (테스트되지 않은) maven repo에 대한 종속성을 추가하십시오.
buildscript {
repositories {
...
// You need to add the following repository to download the
// new plugin.
google() // new which replace https://maven.google.com
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0' //Minimum supported Gradle version is 4.6.
}
}
커맨드 라인을 통해 컴파일하기 위해 maven repo를 BOTH buildscript
및 에 포함해야했습니다 allprojects
.
뿌리 build.gradle
:
buildscript {
repositories {
jcenter()
maven { url 'https://maven.google.com' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0-alpha2'
...
}
}
allprojects {
repositories {
jcenter()
maven { url 'https://maven.google.com' }
}
}
에 필요한 buildscript
가 AGP를 찾기 위해 블록과의 allprojects
블록을 찾을 수 android.arch
및 com.android.databinding
패키지 (및 기타)
업데이트 : 새로운 저장소가 방금 호출 된 google()
것처럼 보이지만 여전히 두 곳에서 선언해야했습니다.
여기 및 다른 곳에서 모든 답변을 동기화하려면 :
buildscript { repositories { google() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.0.0' } }
build.gradle의 빌드 스크립트를 다음과 같이 만드십시오. 구글과 jcenter 사이에서 모든 것을 찾습니다. 이 답변 중 하나만 모든 종속성을 찾을 수는 없습니다.
mtrakal의 솔루션은 잘 작동했습니다.
gradle.build에 추가되었습니다 :
buildscript {
repositories {
maven { url 'https://maven.google.com' }
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0-alpha2'
// NOTE: Do not place your application dependencies here;
// they belong in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
그런 다음 자동으로 alpha2로 업그레이드되었습니다.
캐시를 무효화하고 다시 시작하면됩니다.
파일 | 캐시 무효화 / 재시작
'Invalidate & Restart'를 선택하십시오
나는 이걸했다:
SDk Manager를 클릭하십시오.
카나리아 채널 업데이트 변경, 확인 및 업데이트 ...
build.gradle로 이동하여 컴파일 버전을 26.0.0-beta2로 변경하십시오.
gradle / build.gradle로 이동하여 종속성 클래스 경로 'com.android.tools.build:gradle:3.0.0-alpha7'을 변경 한 후 :
프로젝트를 동기화 한 후 ... 그것은 나에게 효과적입니다! 도움이 되었기를 바랍니다 ... tks!
최상위 build.gradle에 다음 줄을 추가하면 문제가 해결됩니다.
maven { url 'https://maven.google.com' }
이 항목을 추가하면 모든 것이 작동하면 위에서 언급 한 것과 정확히 동일한 오류가 발생합니다.
업데이트 : 매우 실망 스럽지만 리포지토리의 Google 리디렉션은 maven.google.com
리소스를로드하는 데 혼란스러워 보입니다. 대신 저장소를 maven { url 'https://dl.google.com/dl/android/maven2' }
파일로 설정하면 해결됩니다. 3.0.0 Alpha 에서 완전한 자원을 얻으려고 시도하면이를 증명할 수 있습니다.https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.0.0-alpha1/gradle-3.0.0-alpha1.pom
This is because currently the gradle:3.0.0-alpha1
is only being served via the new 'https://maven.google.com'
repository, but the site currently 404s at that location otherwise, being a public directory, you'd see a tree listing of all the files available by simply navigating to that location in your browser. When they resolve their outage, your CI build should pass immediately.
I find this at google: https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration.html
It mentiones that we need to
- Update Gradle version to gradle-4.1-all ( change
gradle-wrapper.properties
bydistributionUrl=\https\://services.gradle.org/distributions/gradle-4.1-all.zip
- Add google() to repositories
repositories { google() }
anddependencies { classpath 'com.android.tools.build:gradle:3.0.0-beta7' }
You may require to have Android Studio 3
Android Studio (Preview) sometimes recommends updating to a Gradle Plugin that is not available yet (did Google forget to publish it?). Such as today with
'com.android.tools.build:gradle:3.1.0-beta1'
I found I can see current versions of com.android.tools.build:gradle here, and then I just pick the newest:
https://dl.google.com/dl/android/maven2/index.html
I just found this beta1 gradle bug in the Android Bug Tracker. I also just learned Android Studio > Help Menu > Submit Feedback brought me to the bug tracker.
Found temporary solution at androiddev reddit for the 3.1.0-beta1 problem: Either roll back to Preview Canary 8, or switch to gradle plugin 3.0.1 until Canary 10 is released shortly.
My problem was that I forgot that I added a proxy in gradle.properties
in C:\Users\(current user)\.gradle
like:
systemProp.http.proxyHost=****
systemProp.http.proxyPort=8850
안드로이드 스튜디오를 3.2에서 3.3으로 업데이트하고 아무도 작동하지 않는 모든 답변을 테스트 할 때이 문제가 있습니다. 결국 Maven 저장소와 그 작업을 가능하게했습니다.
나를 위해 저장소 에이 줄을 추가 하여이 오류를 해결했습니다.
maven { url 'https://maven.google.com' }
이것을 추가하십시오
buildscript {
repositories {
...
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
}
}
작동합니다 ... 건배 !!!
'Programming' 카테고리의 다른 글
범위에서 임의의 정수 생성 (0) | 2020.06.08 |
---|---|
예 / 아니요 입력과 같은 APT 명령 행 인터페이스? (0) | 2020.06.08 |
"camelCase"를 "Camel Case"로 변환하는 방법? (0) | 2020.06.08 |
애니메이션없이 활동 전환 (0) | 2020.06.08 |
문자열에 포함-대소 문자 무시 (0) | 2020.06.08 |