learn icon indicating copy to clipboard operation
learn copied to clipboard

Make app lightweight..

Open sapatevaibhav opened this issue 1 year ago • 3 comments

The recent addition of new modules has significantly increased the APK size. It has been observed that some of the assets are unusually large. It is recommended to either compress these assets or consider using alternative ones to reduce the APK size to approximately 22-25 MB.

Additionally, any suggestions or alternative solutions to address this issue are welcome.

sapatevaibhav avatar May 25 '24 19:05 sapatevaibhav

Hey @sapatevaibhav i would like to work on this issue can you pls assign it to me.

hiranj-kotak avatar May 26 '24 13:05 hiranj-kotak

Hello, I would like to work on this issue. I have already worked on 3 issues of this project. @sapatevaibhav

Gaurav-Kushwaha-1225 avatar May 26 '24 16:05 Gaurav-Kushwaha-1225

@hiranj-kotak sorry bro you are here first but you have another issue assigned...

sapatevaibhav avatar May 26 '24 18:05 sapatevaibhav

I noticed a few things while doing this issue.

  • Firstly, release app app-release.apk wasn't being compiled after running flutter build apk or flutter build apk --release command in the terminal. It was constantly giving below error.
[!] Your project requires a newer version of the Kotlin Gradle plugin.
    Find the latest version on https://kotlinlang.org/docs/gradle.html#plugin-and-versions, then update project/android/build.gradle:
    ext.kotlin_version = '<latest-version>'
  • Then, I saw a solution on StackOverFlow to delete the android folder in the project directory and run flutter create .
  • After that, flutter build apk or flutter build apk --release commands worked and gave an .apk file of 35MB size
  • But, using flutter build apk --split-per-abi command also I got an .apk file of 21MB size. I read about this command on this StackOverFlow Page 2nd Answer.
  • Since, the app size is already below 25MB if we use flutter build apk --split-per-abi command, so the issue is resolved.

Gaurav-Kushwaha-1225 avatar May 27 '24 21:05 Gaurav-Kushwaha-1225

Same flutter build apk --split-per-abi gives me the apk of 28 MBs.

sapatevaibhav avatar May 28 '24 18:05 sapatevaibhav

I think it would be great if we use firebase storage to store images and audio as it will help to reduce the size of app. And if you would like to go with this approch can you assign the issue to me?

Prathme07 avatar May 30 '24 15:05 Prathme07

Priority is to keep app offline..

sapatevaibhav avatar May 31 '24 06:05 sapatevaibhav