Home > Back-end >  Adding flavour based dependencies in Android
Adding flavour based dependencies in Android

Time:01-05

Hi I am trying to add some dependencies based on flavour in my Android project. My code looks like as follow

android {
    
    productFlavors {
        customextended {}
        customini {}
    }
}


dependencies {
    customextendedImplimentation 'dependency_name'
}

Above code throws following error

A problem occurred evaluating project ':app'.
> Could not find method customextendedImplimentation() for arguments [dependency_name] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

CodePudding user response:

as follows

android {
    
    productFlavors {
        customextended {}
        customini {}
    }
}


dependencies {
    customextendedImplementation 'dependency_name'
}

your single misspelling

  • Related