skip to Main Content

I have looked for many solutions but still the name remains the same : app-release.apk

android.applicationVariants.all { variant ->
variant.outputs.all { output ->
        def newApkName = "Goods Tracker.apk"
        outputFileName = newApkName
    }
}

 applicationVariants.all { variant ->
    variant.outputs.all {
        outputFileName = "Goods Tracker.apk"
    }
}

I’ve tried both ways, but the result is the same :

√ Built buildappoutputsflutter-apkapp-release.apk

2

Answers


  1. Chosen as BEST ANSWER

    I already specify the outputFileName, here the code :

    Even though i already specify the output still same :

    √ Built buildappoutputsflutter-apkapp-release.apk (50.0MB)

    but the below method previously worked, but after I added code or fixed my code in lib, this method doesn't work

    applicationVariants.all { variant ->
        variant.outputs.all { output ->
            def newName = "Goods Tracker.apk"
            output.outputFileName = newName
        }
    }
    

  2. I think you need to spcify the outputFileName in the attribute of output

    output.outputFileName = "Goods Tracker.apk"
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search