错误中的错误文件名,目录名或卷标签语法不正确

时间:2019-04-19 12:09:42

标签: java android

我有这个错误

D:\zigzagtelegram\TMessagesProj\property(interface org.gradle.api.file.Directory, transform(property(interface org.gradle.api.file.Directory, fixed(class org.gradle.api.internal.file.DefaultProjectLayout$FixedDirectory, D:\zigzagtelegram\TMessagesProj\build))))\AndroidManifest.xml (The filename, directory name, or volume label syntax is incorrect)  

,并且build.gradle中的以下代码是错误显示的位置

 applicationVariants.all { variant ->
    variant.outputs.all { output ->
        output.processManifest.doLast {
            def abiVersion = variant.productFlavors.get(0).abiVersionCode
            String manifestPath = "$manifestOutputDirectory/AndroidManifest.xml"
            def manifestContent = file(manifestPath).getText()
            manifestContent = manifestContent.replace(String.format('android:versionCode="%d"', defaultConfig.versionCode), String.format('android:versionCode="%s"', defaultConfig.versionCode * 10 + abiVersion))
            file(manifestPath).write(manifestContent)
        }
    }
}

0 个答案:

没有答案