androidfluttervideocallzegocloud

My Flutter app is crashing when i am using zegocloud prebuilt ui call kit


I am using zegocloud prebuilt ui kit and it is crashing when i am opening the apk after building apk using flutter build apk command. can anyone also faced the same problem and if anyone faced this same problem please let me know also the solution you used to fix this issue. Thanks for help..

I am facing this issue while creating apk with command - flutter build apk. Also i am new to flutter.


Solution

  • Please check if you have created proguard-rules.pro file if not then In your project's your_project > android > app folder, create a proguard-rules.pro file with the following content as shown below:

    -keep class **.zego.**  { *; }
    -keep class **.**.zego_zpns.** { *; }
    

    The reason for crash is that in android release mode proguard will obstructed code so you need to add this in proguard file.

    you can check in there doc to here the link : https://docs.zegocloud.com/article/14826