美文网首页
buildConfigField 配置数组

buildConfigField 配置数组

作者: 真胖大海 | 来源:发表于2020-02-17 11:48 被阅读0次

    在app.gradle中

     buildConfigField "String[]", "URL_ARRAY",
            "{" +
            "\"http:someurl\"," +
            "\"http:someurl\"," +
            "\"http:someurl\"" +
            "}"
    

    如果field想使用def 定义的值,则

    def stringArray=  "{" +
            "\"http:someurl\"," +
            "\"http:someurl\"," +
            "\"http:someurl\"" +
            "}"
    
    
     buildConfigField "String[]", "URL_ARRAY", "${stringArray}"
    
    

    相关文章

      网友评论

          本文标题:buildConfigField 配置数组

          本文链接:https://www.haomeiwen.com/subject/hqkbfhtx.html