DEV Community

Cover image for How to solve shrinker error in Flutter.
Samuel Adekunle
Samuel Adekunle

Posted on • Edited on

8 2

How to solve shrinker error in Flutter.

So I just came across this error while I was trying to integrate google sign in into one of my Flutter app.

shrinker may have failed to optimize the Java bytecode.
To disable the shrinker, pass the — no-shrink flag to this command
Alt Text

So, to solve this error just navigate to {your-app-name}\android\app\build.gradle, when you get to the build.gradle file just scrolls down to where defaultConfig was specified and change the minSdkVersion from 16 to 21 and the problem is gone.

Alt Text

This solution work like a charm, if your error has been solved through this article don’t forget to subscribe to the newsletter. Thanks

Join Flutter Developer Community: Telegram | Facebook | WhatsApp

Let’s connect each other online:
Github, Twitter, Youtube, Medium, LinkedIn

Happy Fluttering 👩‍💻

Sentry blog image

The countdown to March 31 is on.

Make the switch from app center suck less with Sentry.

Read more

Top comments (0)

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

Rather than just generating snippets, our agents understand your entire project context, can make decisions, use tools, and carry out tasks autonomously.

Read full post