阅读更多

 

 

1. build -> Generate Signed APK



 

2. next -》 next 



 

 

 3. 多渠道打包

 

 

 

    signingConfigs {        debug {            keyAlias 'curiousby'            keyPassword '123456'            storeFile file('C:\\Users\\cmcc-B100036\\Desktop\\android\\iteyeblog-as\\iteyeblog-as.jks')            storePassword '123456'        }        release {            keyAlias 'curiousby'            keyPassword '123456'            storeFile file('C:\\Users\\cmcc-B100036\\Desktop\\android\\iteyeblog-as\\iteyeblog-as.jks')            storePassword '123456'        }    }    buildTypes {        // 打测试包        debug{            // 显示Log            buildConfigField "boolean", "DEBUG_ENABLE", "true"//            versionNameSuffix "-debug"            minifyEnabled false            zipAlignEnabled false            shrinkResources false            signingConfig signingConfigs.debug        }        // 打正式包        release {            // 不显示Log            buildConfigField "boolean", "DEBUG_ENABLE", "false"            // 启用混淆            minifyEnabled false            // Zipalign优化            zipAlignEnabled true            // 移除无用的resource文件            shrinkResources false            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'            // 签名            signingConfig signingConfigs.release            // 修改文件名            applicationVariants.all { variant ->                variant.outputs.each { output ->                    def outputFile = output.outputFile                    if (outputFile != null && outputFile.name.endsWith('.apk')) {                        // 输出apk名称为IteyeBlog_v1.0_2016-07-31_wandoujia.apk                        def fileName = "IteyeBlog_${defaultConfig.versionName}_${variant.productFlavors[0].name}.apk" //_${releaseTime()}                        output.outputFile = new File(outputFile.parent, fileName)                    }                }            }        }    }    // 配置渠道包    productFlavors {        MAIN {            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "MAIN"]        }        WANDOUJIA {            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "WANDOUJIA"]        }        BAIDU {            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "BAIDU"]        }        QIHU360 {            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "QIHU360"]        }        XIAOMI {            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "XIAOMI"]        }        YINGYONGBAO {            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "YINGYONGBAO"]        }    }

 

 

 

 点击 task



 

 

4. 使用 eclipse 签名 打包 

  signingConfigs {        debug {            keyAlias 'baoyou'            keyPassword '123456'            storeFile file('C:\\Users\\cmcc-B100036\\Desktop\\android\\android-cmcc-B100036')            storePassword '123456'        }        release {            keyAlias 'baoyou'            keyPassword '123456'            storeFile file('C:\\Users\\cmcc-B100036\\Desktop\\android\\android-cmcc-B100036')            storePassword '123456'        }    }

 

 

 

 

 

 

 

 

 

 

 

 

 

 

捐助开发者

在兴趣的驱动下,写一个免费的东西,有欣喜,也还有汗水,希望你喜欢我的作品,同时也能支持一下。 当然,有钱捧个钱场(支持支付宝和微信捐助,加入it技术扣扣群),没钱捧个人场,谢谢各位。



 
 
 谢谢您的赞助,我会做的更好!

 

 

 

  • 大小: 25.2 KB
  • 大小: 8.6 KB
  • 大小: 57.4 KB
  • 大小: 11.7 KB
  • 查看图片附件

更多相关文章

  1. android获取屏幕大小
  2. 编译cubieboard android 源码过程详解之(六):pack
  3. Android(安卓)APK 打包
  4. Android常用框架地址
  5. android调整checkbox的大小
  6. android开机logo制作
  7. as android 打包
  8. Android的OpenGL学习笔记(1)
  9. 打包Android程序—Android跟我学2.2

随机推荐

  1. 在使用kendo网格中的删除按钮后,如何刷新M
  2. jQuery自动完成不适用于多个文本输入
  3. 注册的时候,点击注册按钮,用jquery怎么直接
  4. Send JSON object to Struts 2 action by
  5. jquery 插件bgStretcher 切换背景图片
  6. jquery select(每个)所有选中的复选框?
  7. jquery ajax基本用法
  8. 谷歌地图信息窗口按钮没有显示?
  9. 为什么在使用jquery读写表单输入时必须对
  10. 在Rails应用程序中结合Scriptaculous和JQ