Skip to content Skip to sidebar Skip to footer

Gradle Version 4.6 - Absolute Path Are Not Supported When Setting An Output File Name

I am a newbie to Android. So as part of my learning I was following this tutorial to make an icon pack - https://blog.prototypr.io/how-to-create-an-android-icon-pack-app-ecb77811b9

Solution 1:

it works alike this with later version of Gradle:

android.applicationVariants.all { variant ->
    variant.outputs.all { output ->
        def fileName = "${project.name}_${output.baseName}-${variant.versionName}.apk"
        outputFileName = new File(output.outputFile.parent, fileName).getName()
    }
}

because output.outputFileName is (or had become) a read-only property.

Post a Comment for "Gradle Version 4.6 - Absolute Path Are Not Supported When Setting An Output File Name"