Found this @ https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration.html

Modifying variant outputs at build time may not work

Using the Variant API to manipulate variant outputs is broken with the new plugin. It still works for simple tasks, such as changing the APK name during build time, as shown below:

// If you use each() to iterate through the variant objects,// you need to start using all(). That's because each() iterates// through only the objects that already exist during configuration time—// but those object don't exist at configuration time with the new model.// However, all() adapts to the new model by picking up object as they are// added during execution.    android.applicationVariants.all { variant ->        variant.outputs.all {            outputFileName = "${variant.name}-${variant.versionName}.apk"        }    }

更多相关文章

  1. 代码中设置drawableleft
  2. android 3.0 隐藏 系统标题栏
  3. Android开发中activity切换动画的实现
  4. Android(安卓)学习 笔记_05. 文件下载
  5. Android中直播视频技术探究之—摄像头Camera视频源数据采集解析
  6. 技术博客汇总
  7. android 2.3 wifi (一)
  8. AndRoid Notification的清空和修改
  9. Android中的Chronometer

随机推荐

  1. activity以dialog形式显示
  2. android 按照字母的顺序排序
  3. android中ramdisk解压与打包
  4. Android 解析 ByteArrayInputStream
  5. Android下使用iCal4j库
  6. android 创建数字签名应用程序
  7. Android应用框架无边界
  8. 【Android 开发教程】经过预定义的查询字
  9. android 开发学习笔记 (一)
  10. Android 中会出现的问题:This Android SDK