首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >variant.getAssemble()已过时,已被替换为variant.getAssembleProvider()

variant.getAssemble()已过时,已被替换为variant.getAssembleProvider()
EN

Stack Overflow用户
提问于 2019-04-20 19:22:15
回答 1查看 2.2K关注 0票数 2

我没有从我的项目中调用variant.getAssemble(),但仍然显示这些消息。当我尝试运行这个项目时,我得到了这个错误:"Manifest Merger with multiple errors in Android Studio“

代码语言:javascript
复制
'variant.getAssemble()' is obsolete and has been replaced with 'variant.getAssembleProvider()'.

Gradle.build文件在这里,我在这里不使用variant.getAssemble()。如果系统正在调用它,那么我在哪里可以找到它来解决这个问题。我有多个模块。

代码语言:javascript
复制
apply plugin: 'com.android.application'

apply plugin: 'com.google.firebase.firebase-crash'

dependencies {

implementation project(':A')
implementation project(':B')
implementation project(':C')
implementation project(':D')
//implementation project(':E')
implementation project(':F')
implementation project(':G')

implementation "com.android.support:appcompat-v7:$project.supportVersion"
implementation "com.android.support:support-v4:$project.supportVersion"
implementation "com.android.support:cardview-v7:$project.supportVersion"
implementation "com.android.support:recyclerview-v7:$project.supportVersion"
implementation "com.android.support:design:$project.supportVersion"
implementation "com.android.support:support-v13:$project.supportVersion"
implementation "com.android.support:support-vector-drawable:$project.supportVersion"

implementation "com.google.firebase:firebase-core:$project.firebaseCore"
implementation "com.google.firebase:firebase-ads:$project.firebaseAds"
implementation "com.google.firebase:firebase-auth:$project.firebaseAuth"
implementation "com.google.firebase:firebase-messaging:$project.firebaseMessaging"
implementation "com.google.firebase:firebase-crash:$project.firebaseCrash"

implementation "com.google.code.gson:gson:$project.gsonVersion"
implementation "com.google.guava:guava:$project.guavaVersion"
implementation "org.jsoup:jsoup:$project.jsoupVersion"
implementation "ch.acra:acra:$project.acraVersion"
implementation "com.mcxiaoke.volley:library:$project.volleyVersion"
// optional

debugImplementation "com.squareup.leakcanary:leakcanary-android:$project.leackcanaryVersion"
releaseImplementation "com.squareup.leakcanary:leakcanary-android-no-op:$project.leackcanaryVersion"
testImplementation "com.squareup.leakcanary:leakcanary-android-no-op:$project.leackcanaryVersion"
implementation 'com.android.support:multidex:1.0.3'
implementation "com.squareup.retrofit2:retrofit:$project.RetrofitVersion"
implementation "com.squareup.retrofit2:converter-gson:$project.RetrofitGsonVersion"
}

android {

defaultConfig {
    applicationId "com.XXX.XXXX"
    multiDexEnabled = true
    vectorDrawables.useSupportLibrary = true
}

android.applicationVariants.all { variant ->
    variant.outputs.all { output ->
        def relativeRootDir = output.packageApplication.outputDirectory.toPath().relativize(rootDir.toPath()).toFile()
        output.outputFileName = new File( "$relativeRootDir" + File.separator+"libs", project.name+"-"+project.versionName+".apk")
    }
}
}

apply plugin: 'com.google.gms.google-services'
EN

回答 1

Stack Overflow用户

发布于 2019-04-20 19:29:43

您可以放心地忽略它。一些像Fabric这样的插件会导致这些警告,因为它的开发者必须适应新的Android Studio/Gradle版本。只要确保使用最新版本的依赖项即可。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/55773025

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档