Could not find property 'processManifest' on com.android.build.gradle.internal.api.ApplicationVariantImpl

后端 未结 5 2064
遇见更好的自我
遇见更好的自我 2020-12-15 19:37

I am currently trying to update Android Studio to 1.0.0-RC. This seems to require gradle Android plugin 1.0.0-rc1. After the update, I started having the following error:

5条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-15 20:17

    android.applicationVariants.all{ variant ->
    variant.outputs.each { output ->
        output.processManifest.doLast{ 
        def manifestFile = output.processManifest.manifestOutputFile
        def updatedContent =manifestFile.getText('UTF-8').replaceAll("UMENG_CHANNEL_VALUE", "${variant.productFlavors[0].name}")
        manifestFile.write(updatedContent, 'UTF-8')
        }
    }
    

    }

    I changed it in this way, which just add a new layer outside the older one. This works because processManifest is now in the outputs field. Think this could be helpful.

提交回复
热议问题