Search code examples
androidandroid-gradle-pluginbuild.gradle

ShrinkProtoResourcesAction Premature end of file


i'm not able to generate release APK. Getting the following Build error.

    Execution failed for task ':app:shrinkReleaseRes'.
> A failure occurred while executing com.android.build.gradle.internal.transforms.ShrinkProtoResourcesAction
   > ParseError at [row,col]:[21,1]
     Message: Premature end of file.

Not able to open or find ShrinkProtoResourcesAction file. Check Proguard file everything seems ok. Also i'm able to generate .aab file but facing issue while generating .apk file.


Solution

  • I found the issue, there was some empty xml been added which was causing the error.