Reputation: 1
../../.pub-cache/hosted/pub.dev/agora_uikit-1.3.10/lib/controllers/rtc_event_handlers.dart:305:6: Error: No named parameter with the name 'onExtensionError'.
}, onExtensionError: (provider, extension, error, message) {
^^^^^^^^^^^^^^^^
../../.pub-cache/hosted/pub.dev/agora_rtc_engine-6.5.0/lib/src/agora_rtc_engine.dart:1648:9: Context: Found this candidate, but the arguments don't match.
const RtcEngineEventHandler({
^^^^^^^^^^^^^^^^^^^^^
Target kernel_snapshot_program failed: Exception
FAILURE: Build failed with an exception.
I am creating a video calling function in my flutter app using agora. It's supposed to generate automatic tokens for every call. I created a backend server with Node.js But when I tried to run my application, I get an error about onMediaDeviceChanged
. I can't quite figure it out. Please help.
Upvotes: 0
Views: 289
Reputation: 1
My project's Flutter SDK version is 3.24.3. I couldn't run my project after adding the latest version of agora_uikit (1.3.10) to the Pubspec.yaml file facing the same issue you mentioned above.
I checked the Pubspec.lock file and found that another package, agora_rtc_engine, was added to the file with its latest version 6.5.0 because agora_uikit depends on it. You can find out the use of Pubspec.lock file here.
When a package is newly added to Pubspec.lock without already existing inside the cached packages of the Flutter SDK on your system, its latest version is added by default (6.5.0 in our case). The problem is that this version is mentioned inside the error log. So, I tried downgrading this version to see if the project would run.
With the following steps, my project ran successfully.
I typed flutter pub cache clean
in my IDE terminal (to clean the cached packages including version 6.5.0 of agora_rtc_engine).
Then, added the following dependencies to the Pubspec.yaml file:
agora_uikit: ^1.3.10
agora_rtc_engine: 6.3.2
to force using 6.3.2 version of agora_rtc_engine.
Note: make sure it's 6.3.2 not ^6.3.2 because adding the "^" means you want the following version number or a newer one and in our case we don't want the newer version (6.5.0).
flutter pub get
inside the terminal to fetch the dependencies after being updated. When I ran my project, it worked.I hope this helps.
Upvotes: 0