gradle.build里面创建编译时属性值
2016-01-29 10:51
423 查看
android { compileSdkVersion 21 buildToolsVersion '21.1.2' defaultConfig { minSdkVersion 16 targetSdkVersion 16 Properties props = new Properties() props.load(new FileInputStream("sampleapp/sampleapp.properties")) buildConfigField "String", "key1", props.getProperty("value1") buildConfigField "String", "key2", props.getProperty("value2") } }
根据以上配置,编译后自动生成BuildConfig.java
相关文章推荐
- List<KeyValuePair<int, DateTime> 用法
- iOS _ UIButton 标题字体大小颜色位置等
- 小新V4000 UEFI装WIN7系统
- Query execution was&nb…
- 使用Anemometer基于pt-query-diges…
- pt-query-digest分析mysql查询日志
- MySQL主从同步报Client reque…
- hdu 3530 Subsequence
- dpdk中uio技术
- 当一个从XIB创建的视图的子控制器在UI上不显示要想到视图控制器的autoresizingMask属性
- Long Value输出方法
- Android开发笔记-使用Handler机制更新UI的三种解决方案
- UIButton 图片和文字上下排列
- Qt使用教程之创建Qt Quick应用程序(三)
- Educational Codeforces Round 4 612C Replace To Make Regular Bracket Sequence(脑洞)
- 《iOS Human Interface Guidelines》——VoiceOver
- hdu 4296 Buildings
- UIScrollView 属性简介
- 百度编辑器 Ueditor 如何增加字体 ?
- 2016太原UI设计师郭文军讲ui界面设计中iPhone官方字体