Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make app lightweight.. #145

Closed
sapatevaibhav opened this issue May 25, 2024 · 7 comments
Closed

Make app lightweight.. #145

sapatevaibhav opened this issue May 25, 2024 · 7 comments
Assignees
Labels
gssoc Girl Script Summer of Code level3 Complex to solve issues for GSSoC'24

Comments

@sapatevaibhav
Copy link
Member

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 sapatevaibhav added gssoc Girl Script Summer of Code level3 Complex to solve issues for GSSoC'24 labels May 25, 2024
@hiranj-kotak
Copy link
Contributor

hiranj-kotak commented May 26, 2024

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

@Gaurav-Kushwaha-1225
Copy link
Contributor

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

@sapatevaibhav
Copy link
Member Author

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

@Gaurav-Kushwaha-1225
Copy link
Contributor

Gaurav-Kushwaha-1225 commented May 27, 2024

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.

@sapatevaibhav
Copy link
Member Author

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

@Prathme07
Copy link
Contributor

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?

@sapatevaibhav
Copy link
Member Author

Priority is to keep app offline..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gssoc Girl Script Summer of Code level3 Complex to solve issues for GSSoC'24
Projects
None yet
Development

No branches or pull requests

4 participants