pavelzaichyk / flutter_unity_ads

Unity Ads plugin for Flutter Applications. This plugin is able to display Unity Banner Ads and Unity Video Ads.
https://pub.dev/packages/unity_ads_plugin
MIT License
32 stars 13 forks source link

MissingPluginException(No implementation found for method init on channel com.rebeloid.unity_ads) #56

Closed ArZHa03 closed 6 months ago

ArZHa03 commented 6 months ago

Describe the bug [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: MissingPluginException(No implementation found for method init on channel com.rebeloid.unity_ads)

Details

  1. pubspec.yaml: unity_ads_plugin: ^0.3.16
  2. android/app/build.gradle: (depencies) implementation 'com.ironsource.adapters:unityadsadapter:4.3.39' implementation 'com.unity3d.ads:unity-ads:4.11.3'
  3. android/app/scr/main/AndroidManifest.xml: (permission) <uses-permission android:name="com.google.android.gms.permission.AD_ID"/>
  4. Unity init: image
kim-mini6 commented 6 months ago

I have the same problem. Is there a solution?

ArZHa03 commented 6 months ago

I have the same problem. Is there a solution?

dont have, after update version ... the problem just arrived. Before 0.3.16 version, i was work perfectly.

frevostudios commented 6 months ago

The same problem.

Fatal Exception: io.flutter.plugins.firebase.crashlytics.FlutterError: MissingPluginException(No implementation found for method init on channel com.rebeloid.unity_ads) at MethodChannel._invokeMethod(platform_channel.dart:332) at UnityAds.init(unity_ads.dart:34)

josemangandid commented 6 months ago

I solved like this buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } }

pavelzaichyk commented 6 months ago

Adding shrinkResources false and minifyEnabled false to the /android/app/build.gradle file resolves the problem.

android {
...
    buildTypes {
        release {
            // TODO: Add your own signing config for the release build.
            // Signing with the debug keys for now, so `flutter run --release` works.
            signingConfig signingConfigs.debug

            shrinkResources false
            minifyEnabled false
        }
    }
}