to change the name of apk file when i build new apk, but since i use the Android Studio 3.0 Canary 2this error appear: Cannot set the value of read-only property 'outputFile'....
Use outputFileName instead of output.outputFile if you change only file name (that is your case)
Example from the guide:
// 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"
}
}
to change the name of apk file when i build new apk, but since i use the Android Studio 3.0 Canary 2this error appear: Cannot set the value of read-only property 'outputFile'....