android下无法创建目录,Android Studio “Cannot create directory” 无法创建目录
Modifying variant outputs at build time may not workUsing the Variant API to manipulate variant outputs is broken with the new plugin. It still works for simple tasks, such as changing the APK name du
Modifying variant outputs at build time may not work
Using the Variant API to manipulate variant outputs is broken with the new plugin. It still works for simple tasks, such as changing the APK name during build time, as shown below:
// 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"
}
}
更多推荐
所有评论(0)