gradle assemble productflavor android
assemble task 用于组合项目的所有输出,它包含了assembleDebug和assembleRelease两个Task。
通过执行 gradle assemble指令,Gradle会编译出两个Apk——debug和release,如果要执行单独的编译命令,可以使用以下指令
gradle assembleRelease (简写 gradle aR,其它指令的简写基本类似)
配置productflavor
在 build.app里面配置
flavorDimensions="versionname" productFlavors { ceshi{//配置测试版包名和应用名 applicationId "ceshi.yb.com.wanandroid" manifestPlaceholders = [APP_NAME: "@string/app_name_ceshi"] } shengchan{//配置生产版包名和应用名 applicationId "shengchan.yb.com.wanandroid" manifestPlaceholders = [APP_NAME: "@string/app_name_shengchan"] } }
#gradle assembleceshiRelease
参考: https://www.dazhuanlan.com/2020/02/01/5e345d2d2c2f6/?cf_chl_jschl_tk=c1bf14f8bfd25e16b1a1bed87b042a0cd28d5a31-1590559843-0-AQ2ZalHPK3tLcOa72WXJb4x-lqIKM5pTJUikXFhhzkQe8Rv8e6VNqRUBEFQ0FqAqniedP7-t41nYXJEG7tw4JSlg1Z6aGcMWWN0evPVs8fvXw_5hgg7cz-nTc2fLygMfpI_XIdpefX1jTux0f3PifsRrUtUR7_U_tJl8j9iCnBhRJxJlZqM5n9kadil0RjcSPZOqIFBOFi-WYJxLZuOC60I3AoL7WG6jOE5QxNfzUAHcwfO2KDiwai89WaEw2Nz3PotEFNcBvjVRVA_4nptb8RNLH-8WQFCeaXg-1MZvbunhAabEjpC2weP8E9nAL-NADA
相关推荐
CaesarHome 2020-11-09
chenkai00 2020-07-26
CaptainCTR 2020-07-09
afa0 2020-06-23
StephenWong 2020-06-18
chenkai00 2020-06-13
Lucianoesu 2020-06-08
tysforwork 2020-06-05
貌似掉线 2020-05-30
CaptainCTR 2020-05-07
CaptainCTR 2020-05-04
貌似掉线 2020-05-03
CaptainCTR 2020-04-29
貌似掉线 2020-04-29
CaptainCTR 2020-04-23
jsonit 2020-04-23