Mahabub Karim
Mahabub Karim

Reputation: 870

variant.getAssemble() is obsolete and has been replaced with variant.getAssembleProvider()

I didn't call variant.getAssemble() from my project but still showing these messages. When I try to run the project I get this error "Manifest Merger failed with multiple errors in Android Studio "

'variant.getAssemble()' is obsolete and has been replaced with 'variant.getAssembleProvider()'.

Gradle.build file is here, I don't use variant.getAssemble() here. If the system is calling this then where can I find it to solve the issue. I have multiple modules.

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'

Upvotes: 2

Views: 2734

Answers (1)

solidogen
solidogen

Reputation: 659

You can safely ignore it. Some plugins like Fabric cause those warnings, as it's devs have to adapt to new Android Studio/Gradle releases. Just make sure to use latest versions of your dependencies.

Upvotes: 1

Related Questions