鍍金池/ 問答/HTML/ weex安裝中遇到的問題

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

回答
編輯回答
亮瞎她

將如下代碼

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...

2017年3月8日 03:51