构建项目时出现此错误groovy.lang.MissingMethodException: No signature of method: org.gradle.api.internal.file.DefaultFilePropertyFactory$DefaultDirectoryVar.toPath() is applicable for argument types: () values: []
我的gradle脚本看起来像这样newApkName = "${appName}${separator}${output.baseName}${separator}${variant.versionName}.apk" def relativeRootDir = output.packageApplication.outputDirectory.toPath() .relativize(rootDir.toPath()).toFile()
似乎toPath()方法签名已更改。请帮忙
最佳答案
通过解决此问题中的Chris Parker's advice,我能够解决此问题:variantOutput.getPackageApplication() is obsolete