API 'variant.getExternalNativeBuildTasks()'가 더 이상 사용되지 않으며 'variant.getExternalNativeBuildProviders()'로 대체되었습니다.
과 함께 3 Canary Gradle 플인전 Android Studio 3.3 Canary 11 용3.3.0-alpha11들 동기화를 할 때 과 같은 합니다.
WARNING: API 'variant.getExternalNativeBuildTasks()' is obsolete and has been
replaced with 'variant.getExternalNativeBuildProviders()'.
It will be removed at the end of 2019.
For more information, see https://d.android.com/r/tools/task-configuration-
avoidance
Affected Modules: app
오류를 클릭하면 Gradle 파일의 이 줄로 이동합니다.
applicationVariants.all { variant ->
variant.outputs.all {
outputFileName = "${variant.name}-${variant.versionName}.apk"
}
}
제가 여기서 정확히 무엇을 바꿔야 합니까?
기획build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
mavenCentral() // jcenter() works as well because it pulls from Maven Central
maven { url "https://maven.google.com" }
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0-alpha11'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath "io.realm:realm-gradle-plugin:4.1.1"
classpath 'com.google.gms:google-services:3.2.1'
classpath 'com.google.firebase:firebase-plugins:1.1.5'
}
}
allprojects {
repositories {
jcenter()
maven { url "https://maven.google.com" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
// Define versions in a single place
ext {
// Sdk and tools
minSdkVersion = 21
targetSdkVersion = 27
compileSdkVersion = 27
buildToolsVersion = '27.0.3'
// App dependencies
supportLibraryVersion = '27.1.1'
appCompactLibraryVersion = '27.1.1'
playServicesVersion = '15.0.1'
firebaseVersionCore = '16.0.1'
firebaseVersionPerf = '16.0.0'
firebaseVersionMessaging = '17.1.0'
//lottie
lottieVersion = '2.5.0'
}
앱 빌드.그래들
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.25.4'
}
buildscript {
repositories {
maven { url "https://maven.google.com" }
maven { url 'https://maven.fabric.io/public' }
mavenCentral()
}
dependencies {
// These docs use an open ended version so that our plugin
// can be updated quickly in response to Android tooling updates
// We recommend changing it to the latest version from our changelog:
// https://docs.fabric.io/android/changelog.html#fabric-gradle-plugin
classpath 'io.fabric.tools:gradle:'
}
}
}
apply plugin: 'com.android.application'
apply plugin: 'com.google.firebase.firebase-perf'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
apply plugin: 'io.fabric'
apply plugin: 'realm-android'
android {
realm {
syncEnabled = false
}
dexOptions {
javaMaxHeapSize "4g"
}
compileSdkVersion rootProject.ext.compileSdkVersion
defaultConfig {
applicationId "example.com"
minSdkVersion rootProject.ext.minSdkVersion
multiDexEnabled true
versionCode mVersionCode
versionName mVersionName
vectorDrawables.useSupportLibrary = true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildTypes {
applicationVariants.all { variant ->
variant.outputs.all {
outputFileName = "${variant.name}-${variant.versionName}.apk"
}
}
release {
shrinkResources true
minifyEnabled true
useProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
lintOptions {
disable 'MissingTranslation'
}
applicationVariants.all { variant ->
variant.outputs.all {
outputFileName = "${variant.name}-${variant.versionName}.apk"
}
}
}
debug {
shrinkResources true
minifyEnabled true
useProguard true
debuggable true
versionNameSuffix '-DEBUG'
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'debug-proguard-rules.pro'
ext.enableCrashlytics = false
crunchPngs false
}
}
flavorDimensions "default"
lintOptions {
checkReleaseBuilds false
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.1'
}
buildToolsVersion '28.0.2'
}
configurations {
implementation.exclude group: "org.apache.httpcomponents", module: "httpclient"
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "com.android.support:appcompat-v7:$rootProject.appCompactLibraryVersion"
implementation "com.android.support:support-compat:$rootProject.supportLibraryVersion"
implementation "com.android.support:mediarouter-v7:$rootProject.supportLibraryVersion"
implementation "com.android.support:cardview-v7:$rootProject.supportLibraryVersion"
implementation "com.android.support:design:$rootProject.supportLibraryVersion"
api 'com.squareup.retrofit2:retrofit:2.4.0'
api 'com.squareup.okhttp3:okhttp:3.11.0'
api 'com.squareup.okhttp3:logging-interceptor:3.10.0'
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.squareup.retrofit2:adapter-rxjava:2.3.0'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.daimajia.easing:library:2.0@aar'
implementation 'com.daimajia.androidanimations:library:2.3@aar'
implementation 'com.akexorcist:googledirectionlibrary:1.0.5'
implementation 'io.reactivex:rxandroid:1.2.1'
implementation 'io.reactivex:rxjava:1.3.0'
// Wifi hotspot library
implementation 'cc.mvdan.accesspoint:library:0.2.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'org.jsoup:jsoup:1.10.3'
api "com.airbnb.android:lottie:$rootProject.lottieVersion"
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.android.support:recyclerview-v7:27.1.1'
testImplementation 'junit:junit:4.12'
implementation 'com.jakewharton:butterknife:8.8.1'
debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.5.4'
releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.4'
implementation 'com.googlecode.libphonenumber:libphonenumber:8.2.0'
implementation "com.google.android.gms:play-services-base:$rootProject.playServicesVersion"
implementation "com.google.android.gms:play-services-cast-framework:$rootProject.playServicesVersion"
implementation "com.google.android.gms:play-services-auth:$rootProject.playServicesVersion"
implementation "com.google.android.gms:play-services-identity:$rootProject.playServicesVersion"
implementation "com.google.android.gms:play-services-awareness:$rootProject.playServicesVersion"
implementation "com.google.android.gms:play-services-cast:$rootProject.playServicesVersion"
implementation "com.google.android.gms:play-services-drive:$rootProject.playServicesVersion"
implementation "com.google.android.gms:play-services-location:$rootProject.playServicesVersion"
implementation "com.google.android.gms:play-services-maps:$rootProject.playServicesVersion"
implementation "com.google.firebase:firebase-core:$rootProject.firebaseVersionCore"
implementation "com.google.firebase:firebase-perf:$rootProject.firebaseVersionPerf"
implementation "com.google.firebase:firebase-messaging:$rootProject.firebaseVersionMessaging"
implementation "com.google.firebase:firebase-analytics:$rootProject.firebaseVersionCore"
api('com.crashlytics.sdk.android:crashlytics:2.8.0@aar') {
transitive = true
}
api('com.crashlytics.sdk.android:answers:1.4.1@aar') {
transitive = true
}
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
api project(path: ':libraryBTHelper')
api project(':bkk_rush')
debugApi 'com.amitshekhar.android:debug-db:1.0.3'
api "org.jdeferred:jdeferred-android-aar:1.2.6"
implementation 'com.android.support:gridlayout-v7:27.1.1'
}
apply plugin: 'com.google.gms.google-services'
app/build.gradle 파일에서 몇 개의 상수와 기타 중요한 정보를 건너뛰었습니다.
릴리스인 이문는최릴에수에서 되었습니다.'io.fabric.tools:gradle:1.30.0'
두 그라들 패브릭 도구를 1.30.0으로 업데이트하십시오.
buildscript {
// ... repositories, etc. ...
dependencies {
// ...other dependencies ...
classpath 'io.fabric.tools:gradle:1.30.0'
}
}
자세한 내용은 https://github.com/firebase/firebase-android-sdk/issues/198#issuecomment-473435453 .
편집
이 문제는 패브릭 1.28.0에서 수정되었습니다.당신의build.gradle프로젝트 수준의 다음 행을 추가합니다.
classpath 'io.fabric.tools:gradle:1.28.1'
이전 답변
Android Studio를 3.3.0으로 업데이트한 후 발생합니다.apply plugin: 'io.fabric'에 이문제에 .저는 이 문제에 대해 Firebase 팀에 버그 보고서를 보냈습니다.
세 가지 옵션이 있습니다.
다음 버전의 패브릭 플러그인이 릴리스될 때까지 기다립니다.여기에서 최신 버전을 확인하십시오.
Android Studio 3.2.1로 다운그레이드합니다.
달기
io.fabric플러그인
build.gradle앱의 모듈:
apply plugin: 'com.android.application'
// apply plugin: 'io.fabric' <== this plugin causes the error
그러나 이 오류가 발생하더라도 프로젝트를 빌드하고 실행할 수 있습니다.그냥 무시해.
프로그램에서 청중build.gradle과 같은 .
classpath 'com.android.tools.build:gradle:3.2.1'
Android Studio를 수정할 때까지 임시 솔루션인 3.3으로 업데이트한 후 발생합니다.
편집: Android Studio를 다운그레이드할 필요가 없습니다.
오늘부터 업데이트 사용 가능classpath 'io.fabric.tools:gradle:1.28.0'이 문제를 해결하기 위해!
코멘트 아웃을 한다면 글을다는경우댓우.Crashlytics의 플러그인io.fabric 임시로 한 앱 에.
//apply plugin: 'io.fabric'
그런 다음 Project Gradle 파일의 패브릭 Gradle 종속성을 업그레이드하면 다음 문제가 영구적으로 해결됩니다.
classpath 'io.fabric.tools:gradle:1.27.0'
주의: 이것은 경고를 제거하지는 않지만 AS3.3+와 함께 Crashlytics를 사용할 수 있습니다.
실제 문제가 무엇인지는 확실하지 않지만 프로젝트 해결 문제에서 충돌 분석 관련 종속성을 언급합니다.
Crashlytics의 버그로 확인되었고 그들은 작업 중입니다.
https://issuetracker.google.com/issues/116408637
Google 지정자로부터 인용:
23일 je...@google.com #23 2019년 1월 23일 01:40AM
모두 안녕하세요,양해해 주셔서 감사합니다.
모든 경우의 버그는 크래시리틱스에서 온 것으로 보이며 저는 버그를 그들에게 제출했습니다.
제가 당신에게 상황을 계속 알려드리겠습니다.
저에게 디버그 앱은 크래시스틱이나 패브릭에 대한 설명 없이 경고를 실행하고 무시하는 것만으로도 제 장치에서 잘 작동합니다.저는 생산을 시도해 본 적이 없습니다.
업데이트:
Google Issue Tracker는 모든 문제가 Crashlytics에서 발생했기 때문에 이 문제를 Won't Fix(불가능)로 표시했으며 Crashlytics 팀에서 수정하도록 허용했습니다(동일한 Google...).
이 링크를 따라 Crashlytics 업데이트를 수행할 것을 제안합니다.
https://github.com/firebase/firebase-android-sdk/issues/198
참고: 저는 여전히 io.fabric과 함께 Android Studio 3.3을 사용하고 있습니다.도구:gradle:1.26.0은 크래슬리틱스에 대한 코멘트 없이 디버그 앱에서 잘 작동합니다.
업데이트:
이제 제 프로덕션/릴리스 버전 앱에서 정상적으로 작동한다는 것을 확인할 수 있습니다.작동하는지 어떻게 알죠?충돌 보고서를 다시 보냈기 때문입니다 -_-'
어쨌든, 경고를 무시하세요, 그들은 결국 그것을 고쳐야 합니다.
아, 방금 패브릭 1.28.0으로 수정했다고 읽었어요 :)
01/24/2019 최신 뉴스
여기에 정보 https://issuetracker.google.com/issues/116408637
Crashlytics에서 해결책이 나올 때까지 기다려야 합니다. GitHub 문제가 열려 있습니다.
https://github.com/firebase/firebase-android-sdk/issues/198
지금처럼 commento.fabric 플러그인을 사용하지 않는 유일한 방법은 Gradle을 다운그레이드하고 패브릭 클래스 경로를 업그레이드하는 것입니다(이것은 운영 앱에서 작동 중입니다).
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.google.gms:google-services:4.2.0'
classpath 'io.fabric.tools:gradle:1.27.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
말씀드린 대로 패브릭/크래쉬리틱스에 문제가 있습니다.
apply plugin: 'io.fabric'
Crashlytics/Firebase 측 버그입니다. 다음 링크를 확인하고 버그 상태를 확인하십시오. https://github.com/firebase/firebase-android-sdk/issues/198
문제 해결은 "작업 구성 변경"을 참조할 수 있습니다.
은 이 ▁to▁of에 접근하는 수 .BaseVariantImpl,time,t제variant.outputs.all이 메서드에 내부적으로 액세스하지 않습니다. 또는 검사를 통해 액세스할 수 없는 경우, 또는 해당 이름으로 변형에 액세스할 때, 또는 어떻게든 변형에 대한 외부 네이티브 빌드 작업을 비활성화합니다.단일 동기화 프로젝트 동기화 옵션도 참조하십시오. 이 옵션은 관련이 있는 것 같습니다.
또는 빌드 도구를 기다립니다. 3.3.0-alpha12또는3.3.0-beta1...이것은 심지어...release candidate따라서 다른 버그 보고서를 제출하는 데 사용하는 것을 제외하고는 많은 시간을 투자하는 것이 무의미할 수 있습니다.
새로운 빠른 피드백 버튼은 여전히 가장 유망해 보입니다.
저는 다음 단계를 수행했습니다. 1. 프로젝트 수준의 build.gradle에 대한 Gradle 종속성을 업그레이드합니다.
classpath 'io.fabric.tools:gradle:1.28.0'
응용 프로그램 플러그인 아래에 이 플러그인 종속성을 추가합니다. 앱 수준 build.gradle의 'com.plugin.application'.
apply plugin: 'io.fabric'프로젝트를 그라들 파일과 동기화합니다.
이 문제는 Android Studio 3.2.0에서 Android Studio 3.3.0으로 Android Studio가 업데이트되었기 때문에 발생합니다.IO의 Gradle 종속성(프로젝트)을 업데이트합니다.원단. 예를 들면:
classpath 'io.fabric.tools:gradle:1.27.1'
그리고 또한 코틀린 버전을 업데이트합니다.
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.20"
이렇게 하면 이 문제가 해결됩니다.감사해요.
빌드 로그는 특히 빌드를 실행하는 데 필요한 디버그 방법을 인쇄합니다.-Pandroid.debug.obsoleteApi=true그러면 사용되지 않는 API에 대한 호출 스택 추적이 인쇄되고 어떤 플러그인/코드가 호출하는지 파악할 수 있습니다.
코드가 사용자의 코드가 되는 경우 - 새로운 공급자 API를 사용합니다(Lazy Task Configuration doc 참조).
다른 플러그인에서 온 경우 스택 추적 및 경고 메시지와 함께 해당 플러그인에게 보고하고 패치를 제출할 수 있습니다.이 경우와 같이 다음과 관련이 있습니다.io.fabric 발행.
이 문제는 Fabric Gradle 플러그인 1.28.0의 최신 릴리스에서 수정되었습니다. 이 플러그인은 오늘부터 활성화되었습니다.이것을 최상위 build.gradle에 저장합니다.
buildscript {
// ... repositories, etc. ...
dependencies {
// ...other dependencies ...
**classpath 'io.fabric.tools:gradle:1.28.0'**
}
프로젝트를 열었을 때, 저는 다음을 눌렀습니다.Run migrations은 버이오른하모나에타남에서 하단 .Android Studio는 아무런 없이 되었습니다.Crashlytics의존.
에서 build.gradle합니다.
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
해당 라인을 추가한 후 프로젝트를 다시 빌드해야 합니다.
그러면 오류가 해결됩니다. 작업 표시줄에서 Tools->Kotlin->Configure Kotlin in Project(프로젝트에서 Kotlin 구성)를 클릭합니다.
저의 경우, 플러그인을 사용해야 했고, 솔루션은 최신 패브릭 툴 그래들 버전으로 업데이트하는 것이었습니다.
classpath 'com.android.tools.build:gradle:3.3.0'
classpath 'io.fabric.tools:gradle:1.27.0'
Fabric 플러그인을 계속 적용해야 하는 사용자의 경우 프로젝트 수준에서 이전 버전의 Gradle로 돌아가는 것이 임시 해결책입니다.
을 클스경버전다변로음경다니로 합니다.com.android.tools.build:gradle:3.2.1.
은 최근의 그은최문니다습였제에 .gradle의 경우 (나의경우경))3.3.2 및 ) 버전Fabric.io플러그인이제 새 버전으로 해결되었습니다. 사용자는 이를 최상위 수준으로 유지해야 합니다.build.gradle:
buildscript {
// ... repositories, etc. ...
dependencies {
// ...other dependencies ...
classpath 'io.fabric.tools:gradle:1.28.0'
}
}
수정은 루트 빌드 그래들 파일을 최신 버전으로 업데이트합니다.그리고 이 대답은 지금도 사실입니다. 미래에는 그라들과 안드로이드 SDK에 의해 새로운 변화가 구현될 것입니다.때에 따라 답변이 달라질 수 있습니다.
repositories {
maven { url "https://jitpack.io" }
maven {
url 'https://maven.fabric.io/public'
}
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath 'com.google.gms:google-services:4.3.0'
classpath 'io.fabric.tools:gradle:1.30.0'
}
무엇보다도 이것은 오류가 아닙니다.
경고입니다
3.3.0으로 업데이트 그라들을 업데이트할 때 표시됨 io.fabric 때문에 자주 발생하므로 경고가 계속 표시되는 업데이트 fabric 현재 버전이 'io.fabric'이 될 때까지 기다립니다.공구:그레이들:1.27.1'
언급URL : https://stackoverflow.com/questions/52412023/api-variant-getexternalnativebuildtasks-is-obsolete-and-has-been-replaced-wi
'source' 카테고리의 다른 글
| SQL Server 테이블에서 외부 키가 있는 데이터 삭제 (0) | 2023.06.26 |
|---|---|
| SSH 키를 제거하려면 어떻게 해야 합니까? (0) | 2023.06.26 |
| Angular 2 XMLHttpRequest에서 열기를 실행하지 못했습니다.잘못된 URL (0) | 2023.06.26 |
| 카운트(*) "열"에서 별칭을 사용하고 have 절에서 참조할 수 없는 이유는 무엇입니까? (0) | 2023.06.26 |
| Ruby on Rails에서 Gemfile과 Gemfile.lock의 차이점은 무엇입니까? (0) | 2023.06.26 |

