100mslive / 100ms-flutter

Flutter Live Streaming, Video Conferencing SDK & Sample App
https://www.100ms.live/
MIT License
143 stars 73 forks source link

Can't run app after adding this plugin #124

Closed cokariinc closed 3 years ago

cokariinc commented 3 years ago

I get this error when I try to run my app on android (real device)

error: cannot access HMSUpdateListener
      flutterEngine.getPlugins().add(new live.hms.hmssdk_flutter.HmssdkFlutterPlugin());
                                ^
  class file for live.hms.video.sdk.HMSUpdateListener not found
1 error

Also doesn't work on the IOS simulator on M1 Mac with error messages along the lines of

/flutter/.pub-cache/hosted/pub.dartlang.org/hmssdk_flutter-0.1.0/ios/Classes/Models/HMS
    MessageExtension.swift:16:36: error: value of type 'HMSMessage' has no member 'receiver'
            dict["receiver"] = message.receiver
error: value of type 'HMSPermissions' has no member 'askToUnmute'
            dict["ask_to_un_mute"] = permission.askToUnmute
viveky259259 commented 3 years ago

You are getting this issue because of the HMS SDK version try pod upgrade in the ios folder.

pod upgrade
Arunshaik2001 commented 3 years ago

add this implementation 'com.github.100mslive:android-sdk:2.0.7' in module android:app . you will find it in android folder

ygit commented 3 years ago

@cokariinc were you able to resolve this issue?

cokariinc commented 3 years ago

Hi @Arunshaik2001. Thanks, adding what you suggested to the build gradle file fixed my issues on android. Hi @ygit I still can't run the app on ios though. Pod upgrade doesn't seem to be a valid command, I tried pod update but still can't get it to work on the simulator.

ygit commented 3 years ago

@cokariinc You can fork the repo and then -

  1. In project root, run flutter pub get
  2. Change directory to example folder, run flutter packages pub run build_runner build --delete-conflicting-outputs
  3. Run either flutter build ios (OR flutter build apk)
  4. Finally, flutter run
ygit commented 3 years ago

@cokariinc were you able to resolve the issue?

cokariinc commented 3 years ago

Hi, I decided to use another service.

ygit commented 3 years ago

Alright