VaibhavCodeClub/learn

Make app lightweight..

Closed this issue · 7 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.

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

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

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

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.

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

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?

Priority is to keep app offline..