打包配置问题
来源:互联网 发布:matlab 三维矩阵 画图 编辑:程序博客网 时间:2024/05/22 04:55
清单文件配置:
<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.administrator.myapplication"> <uses-sdk android:minSdkVersion="8"></uses-sdk> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.READ_PHONE_STATE"/> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme"> <activity android:name=".MainActivity"> <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> </intent-filter> </activity> <meta-data android:name="UMENG_APPKEY" android:value="00000000000000"></meta-data> <!--渠道号--> <meta-data android:name="UMENG_CHANNEL" android:value="${UMENG_CHANNEL_VALUE"></meta-data> </application></manifest>
APP build.gradle配置
apply plugin: 'com.android.application'android { compileSdkVersion 26 buildToolsVersion "26.0.0" defaultConfig { applicationId "com.example.administrator.myapplication" minSdkVersion 15 targetSdkVersion 26 versionCode 1 versionName "1.0" // dex突破65535的限制 multiDexEnabled true // 默认是umeng的渠道 manifestPlaceholders = [UMENG_CHANNEL_VALUE: "umeng"] } lintOptions { abortOnError false } signingConfigs { debug { // No debug config } release { storeFile file("app.jks") storePassword " " keyAlias "app" keyPassword " " } } buildTypes { release { minifyEnabled true zipAlignEnabled true zipAlignEnabled true 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名称为boohee_v1.0_2015-01-15_wandoujia.apk def fileName = "${variant.productFlavors[0].name}" + ".apk" output.outputFile = new File(outputFile.parent, fileName) } } } } } productFlavors { wandoujia {} _360 {} baidu {} xiaomi {} tencent {} taobao {} } productFlavors.all { flavor -> flavor.manifestPlaceholders = [UMENG_CHANNEL_VALUE: name] }}dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) compile 'com.android.support:appcompat-v7:26.+' compile 'com.android.support.constraint:constraint-layout:1.0.2' testCompile 'junit:junit:4.12'}
gradlew assembleRelease
阅读全文
1 0
- 打包配置问题
- maven在不同环境下的打包配置问题
- 配置Project分环境打包时遇到的问题
- 微信小坑:更换applicationId,微信WXPayEntryActivity多渠道打包配置问题。
- android studio 更新3.0后多渠道打包配置问题
- 打包问题。
- Cocos3d3.10版本配置打包环境要注意的问题和打包失败常见问题的解决办法
- maven 打包时通过yuicompressor-maven-plugin压缩js css配置解决.min.js不能打包问题
- maven项目打包配置
- Ant配置、打包项目
- crawler4j打包与配置
- Gradle 打包基本配置
- Maven程序打包配置
- 打包时的配置
- 多渠道打包(Gradle配置)
- Gradle配置多渠道打包
- Jenkins自动打包配置
- Ant 打包配置
- 字符设备驱动高级篇2——字符设备驱动注册代码分析
- MyBatis一级缓存,二级缓存
- Android中监听语言变化的两种方式
- 面向对象的六大原则
- Codeforces 492A
- 打包配置问题
- UVA-253-骰子涂色
- 创建第一个Django项目(一)
- 【机器学习】卷积神经网络(CNN)架构解析
- 新手上路之oracle 92 99 表连接(笔记)
- 栈的应用:左右符号匹配
- Linux 之基本 shell 命令
- java 里面保留字volatile及其与synchronized的区别
- 将ReactiveObjC整成动态库来调用