最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

Android 配置打包簽名信息的兩種方法

 更新時間:2018年06月07日 17:03:54   投稿:mrr  
這篇文章主要介紹了Android 配置打包簽名信息的兩種方法,非常不錯,具有一定的參考借鑒加載,需要的朋友可以參考下

目錄結(jié)構(gòu)如下:

有2種方式:

第一種,直接配置:

signingConfigs { 
  debug { 
    storeFile file("app/keystore.properties") 
    storePassword "111111" 
    keyAlias "key" 
    keyPassword "111111" 
  } 
  release { 
    storeFile file("app/keystore.properties") 
    storePassword "111111" 
    keyAlias "key" 
    keyPassword "111111" 
  } 
} 
buildTypes { 
  debug { 
    signingConfig signingConfigs.debug 
  } 
  release { 
    minifyEnabled false 
    proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
    signingConfig signingConfigs.release 
  } 
} 

第二種,通過讀取文件

新建keystore.properties文件

storeFile=keyStore.jks 
storePassword=123456 
keyAlias=encrypt 
keyPassword=123456 

build.gradle配置

signingConfigs { 
  // 從keystore.properties文件中讀取信息 
  def keystorePropertiesFile = rootProject.file("app/keystore.properties") 
  def keystoreProperties = new Properties() 
  keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) 
  debug { 
    println("======== debug mode: set key ========") 
    storeFile file(keystoreProperties['storeFile']) 
    storePassword keystoreProperties['storePassword'] 
    keyAlias keystoreProperties['keyAlias'] 
    keyPassword keystoreProperties['keyPassword'] 
  } 
  release { 
    println("======== release mode: set key ========") 
    storeFile file(keystoreProperties['storeFile']) 
    storePassword keystoreProperties['storePassword'] 
    keyAlias keystoreProperties['keyAlias'] 
    keyPassword keystoreProperties['keyPassword'] 
  } 
} 
buildTypes { 
  debug { 
    signingConfig signingConfigs.debug 
  } 
  release { 
    minifyEnabled false 
    proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
    signingConfig signingConfigs.release 
  } 
} 

總結(jié)

以上所述是小編給大家介紹的Android 配置打包簽名信息的兩種方法,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復(fù)大家的。在此也非常感謝大家對腳本之家網(wǎng)站的支持!

相關(guān)文章

最新評論

军事| 通州区| 九寨沟县| 蓬安县| 仪陇县| 霍林郭勒市| 肃南| 烟台市| 绿春县| 开阳县| 双牌县| 泾源县| 比如县| 开封市| 通渭县| 永平县| 静宁县| 惠水县| 抚州市| 喀什市| 武城县| 虞城县| 新乡市| 池州市| 昂仁县| 桐梓县| 连城县| 巴青县| 繁峙县| 井研县| 普兰店市| 南宫市| 原阳县| 视频| 鲜城| 根河市| 渑池县| 新平| 汝阳县| 文登市| 沧源|