If you’re a flutter developer and if you build a release apk/app bundle for Google play store then at-least once you will face this issue “Execution failed for task ‘:flutter_android_pip:verifyRelease Resources’.”
So in this post, I will tell you how to solve this error. Below are the steps for solving this error.
Follow the below steps
Step 1: Open your flutter project in VS Code/Android studio
Step 2: Right click on the android folder
Step 3: After clicking on the right then click on the option ”open in the android studio”
Note: For better understanding open image into new tab.
Step 4:Then go to the android studio.In android studio, you see only android related files.See below image
Step 5: Check the compileSdkVersion and minSdkVersion in build.gradle(:app) and build.gradle(:flutter _android_pip). compileSdkVersion and minSdkVersion required the same version in both files.
See the below screenshot.
Note: This solution also works on this type of error. For e.g.
- Execution failed for task ‘:image_picker:verifyReleaseResources’.
- Execution failed for task ‘:shared_preferences:verifyreleaseresources’.
- Execution failed for task ‘:url_launcher:verifyreleaseresources’.
Hopefully, I will solve your problem. Thank You…!