weex安装中遇到的问题

新手上路,请多包涵
applicationVariants.all { variant ->
    variant.outputs.each { output ->
        def outputFile = output.outputFile
        if (outputFile != null && outputFile.name.equals('app-debug.apk')) {
            def fileName = outputFile.name.replace("app-debug.apk", "weex-app.apk")
            output.outputFile = new File(outputFile.parent, fileName)
        }
    }
}



clipboard.png

阅读 2.1k
1 个回答
新手上路,请多包涵

将如下代码

if (outputFile != null && outputFile.name.equals('app-debug.apk')) {

修改为

if (outputFile != null && outputFile.name.endsWith('.apk') && 'release'.equals('app-debug.apk')) {

我是在这看到的 [1]: https://www.cnblogs.com/fooll...

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进