buildConfigField 配置数组
2020-02-17 本文已影响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}"