Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Unhandled Exception: MissingPluginException(No implementation found for method init on channel com.rebeloid.unity_mediation)

I am using a unity mediation for my app. I am trying to initialize it with this code

UnityMediation.initialize(
    gameId: GetPlatform.isAndroid ? '4865xxx' : '4865xxx',
    onComplete: () => print('Initialization Complete'),
    onFailed: (error, message) => print('Initialization Failed: $error $message'),
  );
  UnityMediation.loadRewardedAd(
    adUnitId: GetPlatform.isAndroid ? 'Rewarded_Android' : 'Rewarded_iOS',
    onComplete: (adUnitId) => print('Rewarded Ad Load Complete $adUnitId'),
    onFailed: (adUnitId, error, message) => print('Rewarded Ad Load Failed $adUnitId: $error $message'),
  );

Following all the documentation provided but get an error like this one

[VERBOSE-2:ui_dart_state.cc(198)] Unhandled Exception: MissingPluginException(No implementation found for method init on channel com.rebeloid.unity_mediation)
#0      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:165:7)
<asynchronous suspension>
#1      UnityMediation.initialize (package:unity_mediation/src/unity_mediation.dart:26:5)
<asynchronous suspension>
[VERBOSE-2:ui_dart_state.cc(198)] Unhandled Exception: MissingPluginException(No implementation found for method loadRewardedAd on channel com.rebeloid.unity_mediation)
#0      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:165:7)
<asynchronous suspension>
#1      UnityMediation._loadAd (package:unity_mediation/src/unity_mediation.dart:115:5)
<asynchronous suspension>
#2      UnityMediation.loadRewardedAd (package:unity_mediation/src/unity_mediation.dart:75:5)
<asynchronous suspension>

Plugin used
https://pub.dev/packages/unity_mediation

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

What is the cause of this problem? I have trying to search but nothing found about this one. Thank you.

>Solution :

Quit the app and run it again. The native code from the package isn’t on the device until do a full start. Hot reload and hot restart won’t work after using a newly installed package.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading