Gradle “manifest requires a placeholder substitution” error but manifestPlaceholders supplies a value

前端 未结 4 353
我在风中等你
我在风中等你 2020-12-11 16:11

I\'m trying to perform substitution within the AndroidManifest.xml file from the build.gradle android extension but am getting this error:

AndroidManifest.xm         


        
4条回答
  •  不思量自难忘°
    2020-12-11 16:54

    You need to just add to the array. You are replacing it. Do this:

    manifestPlaceholders = [encoding: "some value", version: cityVersion]
    

    By declaring manifestPlaceholders twice for the same flavor/build type, your are replacing the previous one. After the previous one got replaced, your build failed because the property no longer exists.

提交回复
热议问题