简体   繁体   English

在 Android 中添加基于风味的依赖项

[英]Adding flavour based dependencies in Android

Hi I am trying to add some dependencies based on flavour in my Android project.您好,我正在尝试在我的 Android 项目中添加一些基于风格的依赖项。 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.

as follows如下

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


dependencies {
    customextendedImplementation 'dependency_name'
}

your single misspelling你的一个拼写错误

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM