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

Excessive App Size After Installing zego_uikit_prebuilt_call #62

Open
2 tasks done
decodevM opened this issue Sep 7, 2024 · 3 comments
Open
2 tasks done

Excessive App Size After Installing zego_uikit_prebuilt_call #62

decodevM opened this issue Sep 7, 2024 · 3 comments

Comments

@decodevM
Copy link

decodevM commented Sep 7, 2024

Environment

Technology Version
Flutter version 3.24.1
Plugin version 4.15.4
Android version +24

Description

After integrating the zego_uikit_prebuilt_call package in my Flutter project, I noticed that the APK size is significantly large. The generated release APK is 182.2MB, which seems excessive for the functionality provided by this single package.

Expected behavior:
The APK size should be smaller and more optimized, especially for a single package integration.

Current behavior:
The release APK size is 182.2MB, which is much larger than expected.

Steps to reproduce

  1. Create a new Flutter project with latest flutter SDK version.
  2. Add the following dependency to pubspec.yaml:
dependencies:
  zego_uikit_prebuilt_call: 4.15.4
  1. Make sure you add the following plugin configurations to your settings.gradle file:
      plugins {
          id "dev.flutter.flutter-plugin-loader" version "1.0.0"
          id "com.android.application" version "7.3.0" apply false
          id "org.jetbrains.kotlin.android" version "1.8.0" apply false
      }
  1. Update your gradle-wrapper.properties file to use the correct distribution URL for Gradle 7.4:
         distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
  add also this configuration of android. 
  1. Run the command to build the release APK:
    flutter build apk --release
  2. Observe the final APK size.

Images

Screenshot 2024-09-07 at 11 10 13
@yoer
Copy link
Collaborator

yoer commented Sep 9, 2024

image

You can reduce the app size using this command

flutter build apk --split-per-abi

@decodevM
Copy link
Author

decodevM commented Sep 9, 2024

After reducing the app size and generating different compatibility versions for my Flutter project, I encountered an issue with the cached_video_player package. The error prevents the build of the app.

cached_video_player: ^2.0.4

Screenshot 2024-09-09 at 08 49 29

@yoer
Copy link
Collaborator

yoer commented Sep 10, 2024

We have never encountered this error. I googled it. Can you try the following steps to solve it?

  1. Open the android/app project
  2. Search the text androidx.core:core-ktx:+ in all solutions. In most cases this is found in build.gradle file.
  3. If you found this text in some dependency, change androidx.core:core-ktx:+ to androidx.core:core-ktx:1.6.0
  4. Sync and run again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants