VideoUIKit-Flutter icon indicating copy to clipboard operation
VideoUIKit-Flutter copied to clipboard

Agora UI Kit is not compiling

Open nikkieke opened this issue 11 months ago • 1 comments

Agora UI Kit was building successfully previously but now it's throwing errors when building the debug app on emulator and device. This is the error log:

../../../AppData/Local/Pub/Cache/hosted/pub.dev/agora_uikit-1.3.7/lib/models/agora_rtc_event_handlers.dart:189:7: Error: Type 'LocalVideoStreamError' not found. LocalVideoStreamError error)? onLocalVideoStateChanged; ^^^^^^^^^^^^^^^^^^^^^ ../../../AppData/Local/Pub/Cache/hosted/pub.dev/agora_uikit-1.3.7/lib/models/agora_rtc_event_handlers.dart:354:40: Error: Type 'RhythmPlayerErrorType' not found. RhythmPlayerStateType state, RhythmPlayerErrorType errorCode)? ^^^^^^^^^^^^^^^^^^^^^ ../../../AppData/Local/Pub/Cache/hosted/pub.dev/agora_uikit-1.3.7/lib/models/agora_rtc_event_handlers.dart:446:7: Error: Type 'LocalAudioStreamError' not found. LocalAudioStreamError error)? onLocalAudioStateChanged; ^^^^^^^^^^^^^^^^^^^^^ ../../../AppData/Local/Pub/Cache/hosted/pub.dev/agora_uikit-1.3.7/lib/models/agora_rtc_event_handlers.dart:521:7: Error: Type 'RtmpStreamPublishErrorType' not found. RtmpStreamPublishErrorType errCode)? onRtmpStreamingStateChanged; ^^^^^^^^^^^^^^^^^^^^^^^^^^ ../../../AppData/Local/Pub/Cache/hosted/pub.dev/agora_uikit-1.3.7/lib/models/agora_rtc_event_handlers.dart:554:23: Error: Type 'ChannelMediaRelayEvent' not found. final void Function(ChannelMediaRelayEvent code)? onChannelMediaRelayEvent; ^^^^^^^^^^^^^^^^^^^^^^ ../../../AppData/Local/Pub/Cache/hosted/pub.dev/agora_uikit-1.3.7/lib/models/agora_rtc_event_handlers.dart:189:7: Error: 'LocalVideoStreamError' isn't a type. LocalVideoStreamError error)? onLocalVideoStateChanged; ^^^^^^^^^^^^^^^^^^^^^ ../../../AppData/Local/Pub/Cache/hosted/pub.dev/agora_uikit-1.3.7/lib/models/agora_rtc_event_handlers.dart:354:40: Error: 'RhythmPlayerErrorType' isn't a type. RhythmPlayerStateType state, RhythmPlayerErrorType errorCode)? ^^^^^^^^^^^^^^^^^^^^^ ../../../AppData/Local/Pub/Cache/hosted/pub.dev/agora_uikit-1.3.7/lib/models/agora_rtc_event_handlers.dart:446:7: Error: 'LocalAudioStreamError' isn't a type. LocalAudioStreamError error)? onLocalAudioStateChanged; ^^^^^^^^^^^^^^^^^^^^^ ../../../AppData/Local/Pub/Cache/hosted/pub.dev/agora_uikit-1.3.7/lib/models/agora_rtc_event_handlers.dart:521:7: Error: 'RtmpStreamPublishErrorType' isn't a type. RtmpStreamPublishErrorType errCode)? onRtmpStreamingStateChanged; ^^^^^^^^^^^^^^^^^^^^^^^^^^ ../../../AppData/Local/Pub/Cache/hosted/pub.dev/agora_uikit-1.3.7/lib/models/agora_rtc_event_handlers.dart:554:23: Error: 'ChannelMediaRelayEvent' isn't a type. final void Function(ChannelMediaRelayEvent code)? onChannelMediaRelayEvent; ^^^^^^^^^^^^^^^^^^^^^^ ../../../AppData/Local/Pub/Cache/hosted/pub.dev/agora_uikit-1.3.7/lib/controllers/rtc_event_handlers.dart:146:6: Error: No named parameter with the name 'onChannelMediaRelayEvent'. }, onChannelMediaRelayEvent: (code) { ^^^^^^^^^^^^^^^^^^^^^^^^ ../../../AppData/Local/Pub/Cache/hosted/pub.dev/agora_rtc_engine-6.3.0/lib/src/agora_rtc_engine.dart:1576:9: Context: Found this candidate, but the arguments don't match. const RtcEngineEventHandler({ ^^^^^^^^^^^^^^^^^^^^^ Target kernel_snapshot failed: Exception

FAILURE: Build failed with an exception.

Please can this be fixed?

nikkieke avatar Mar 02 '24 00:03 nikkieke

Same problem here. This happened after upgrading my Flutter version to 3.19.1

sydneyagcaoili avatar Mar 02 '24 13:03 sydneyagcaoili

This issue has been resolved and the fix has been included in pull request #178 . You can view the details of the pull request here.

  • Removed deprecated onChannelMediaRelayEvent callback from RtcEngineEventHandler.
  • fix the type mismatch issue while compiling.

To integrate these changes into your project and utilize the updated version of agora_uikit before it is merged, you can use the following configuration in your pubspec.yaml.

agora_uikit: 
  git:
    url: https://github.com/muj-i/VideoUIKit-Flutter.git

muj-i avatar Mar 03 '24 21:03 muj-i

Same problem here. This happened after upgrading my Flutter version to 3.19.1

This issue is not related to the Flutter version. The problem occurred because the Agora RTC Engine package changed a bunch of type names and deprecated one named parameter.

I have tested it on the latest Flutter version (3.19.2), and now it is working as expected.

muj-i avatar Mar 03 '24 22:03 muj-i

Same problem here. This happened after upgrading my Flutter version to 3.19.1

This issue is not related to the Flutter version. The problem occurred because the Agora RTC Engine package changed a bunch of type names and deprecated one named parameter.

I have tested it on the latest Flutter version (3.19.2), and now it is working as expected.

You're right. I have tested it now and it's working. No more compile errors. Thank you!

nikkieke avatar Mar 04 '24 13:03 nikkieke

@nikkieke Upgrading flutter with 3.19.2 works with agora_uikit version 1.3.7?

tadaspetra avatar Mar 04 '24 15:03 tadaspetra

I am still seeing this issue with version 3.19.2

tadaspetra avatar Mar 04 '24 15:03 tadaspetra

agora_uikit version 1.3.8 is live. Should be fixed there. Reopen if still seeing this issue

tadaspetra avatar Mar 04 '24 15:03 tadaspetra