Flutter Package : Uncompressed package archive is too large

868 views Asked by At

I am trying to upload my Flutter package to pub.dev. Dry Run work fine no error shown. But When I upload the same package to pub.dev, upload fails with "Uncompressed package archive is too large(size > 104857600).

Any suggestion/solution how to get over it?

4

There are 4 answers

0
Subair K On

"Your package must be less than 100 MB large after gzip compression. If it’s too large, consider splitting it into multiple packages, or cutting down on the number of included resources or examples."

You can see the official documentation

0
Syed Waleed On

If you have 1 or multiple example projects in your package then just delete the 'build' folder of those example projects before publishing your package.

After deleting 'build' folders from example projects simply run dart pub publish

0
anoop4real On

I had this issue recently on updating one of my plugin package. All old versions uploaded properly but this one didnt and there were only minor changes. After some research I found that it was App.framework and Flutter.framework in the examples folder causing the issue. I then ran flutter clean in examples folder and that was it, upload worked. Phew!!

0
MendelG On

For me, I had created a /examples folder which was taking up too much space. I had no choice but to delete it.