HMS-Core / hms-flutter-plugin

This repo contains all of Flutter HMS plugins.
https://developer.huawei.com/consumer/en/doc/overview/HMS-Core-Plugin?ha_source=hms1
Apache License 2.0
282 stars 139 forks source link

No implementation found for method listen on channel #41

Closed xz013 closed 3 years ago

xz013 commented 3 years ago

Hello , I have some problem and hope you can help me :

1- EXCEPTION | ServicesBinding.defaultBinaryMessenger was accessed before the binding was initialized. I/flutter (20409): If you're running an application and need to access the binary messenger before runApp() has been called (for example, during plugin initialization), then you need to explicitly call the WidgetsFlutterBinding.ensureInitialized() first. I/flutter (20409): If you're running a test, you can call the TestWidgetsFlutterBinding.ensureInitialized() as the first line in your test's main() method to initialize the binding.

https://prnt.sc/vl6kxg

2- Unhandled Exception: NoSuchMethodError: The getter 'channel' was called on null.

https://prnt.sc/vl6l6e

3-MissingPluginException(No implementation found for method listen on channel com.huawei.hms.flutter.ads/banner/event/452747774)

https://prnt.sc/vl6li1

4-_testAdSlotId = "testw6vs28auh3"; from where i can register my app ads and get my ads banner id !
hope you can give me a link


My code :

-main

Future initHwAds() async { try { await HwAds.init(); } catch (e) { print('EXCEPTION | $e'); } }

void main() {

initHwAds();

runApp(MyApp()); }


-HomePage

//ads BannerAd _bannerAd; InterstitialAd _interstitialAd; CustomeAdmob myCustomeadmob = CustomeAdmob();

@override void initState() {

 CustomeAdmob().testBannerAdSizeMethods();
_bannerAd =CustomeAdmob().createBannerAd()..loadAd()..show();   
// _interstitialAd =CustomeAdmob().createInterstitialAd()..loadAd()..show();

super.initState();

}

@override void dispose() { super.dispose(); //ads

_interstitialAd?.destroy();
_bannerAd?.destroy();
_bannerAd = null;
_interstitialAd=null;

}


-CustomeAdmob [Class]

static final String _testAdSlotId = "testw6vs28auh3"; final AdParam _adParam = AdParam(); BannerAdSize bannerAdSize = BannerAdSize.s320x50;

BannerAd createBannerAd() { return BannerAd( adSlotId: _testAdSlotId, size: bannerAdSize, adParam: _adParam, bannerRefreshTime: 5000, listener: (AdEvent event, {int errorCode}) { print("Banner Ad event : $event"); }, ); }

InterstitialAd createInterstitialAd(){ return InterstitialAd( adSlotId: "teste9ih9j0rc3", adParam: AdParam(), ); }

void testBannerAdSizeMethods() async { print('isFullWidthSize : ${bannerAdSize.isFullWidthSize}'); print('isDynamicSize : ${bannerAdSize.isDynamicSize}'); print('isAutoHeightSize : ${bannerAdSize.isAutoHeightSize}');

int widthPx = await bannerAdSize.getWidthPx;
print('widthPx : $widthPx');

int heightPx = await bannerAdSize.getHeightPx;
print('heightPx : $heightPx');

BannerAdSize currentDir =
await BannerAdSize.getCurrentDirectionBannerSize(150);
print(
    'getCurrentDirectionBannerSize - width ${currentDir.width} : height ${currentDir.height}');

BannerAdSize landscape = await BannerAdSize.getLandscapeBannerSize(150);
print(
    'getLandscapeBannerSize - width ${landscape.width} : height ${landscape.height}');

BannerAdSize portrait = await BannerAdSize.getPortraitBannerSize(150);
print(
    'getPortraitBannerSize - width ${portrait.width} : height ${portrait.height}');

}

so please if you know what is wrong with my code tell me

sinan-aktepe commented 3 years ago

Hi @xz013 , When you're awaiting in the main(), you should make sure the binding is initialized. Otherwise the plugin may not behave as it should. Adding WidgetsFlutterBinding.ensureInitialized() line in the main() will solve the problem. Also make sure it's the first line in the main().

Future<void> initHwAds() async {
  try {
    await HwAds.init();
  } catch (e) {
    print('EXCEPTION | $e');
  }
}

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  initHwAds();
  runApp(MyApp());
}
xz013 commented 3 years ago

thank you for answer , app run but no ads :

Launching lib\main.dart on Android SDK built for x86 in debug mode... Running Gradle task 'assembleDebug'... √ Built build\app\outputs\flutter-apk\app-debug.apk. Installing build\app\outputs\flutter-apk\app.apk... Waiting for Android SDK built for x86 to report its views... Debug service listening on ws://127.0.0.1:59414/SaX5GPTbwyc=/ws Syncing files to device Android SDK built for x86... I/HiAd (20925):
I/HiAd (20925): ============================================================================ I/HiAd (20925): ====== HiAd-13.4.32.300 I/HiAd (20925): ====== Brand: google Model: Android SDK built for x86 Release: 8.1.0 API: 27 I/HiAd (20925): ============================================================================ I/HUAWEI_ADS_PLUGIN(20925): HW Ads Kit initialized I/zygote (20925): Rejecting re-init on previously-failed class java.lang.Class: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/huawei/hms/api/HuaweiApiClient$ConnectionCallbacks; I/zygote (20925): at boolean com.huawei.hms.ads.jc.I() ((null):-1) I/zygote (20925): at void com.huawei.openalliance.ad.inter.HiAd$2.run() ((null):-1) I/zygote (20925): at void com.huawei.hms.ads.kx.run() ((null):-1) I/zygote (20925): at void java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) (ThreadPoolExecutor.java:1162) I/zygote (20925): at void java.util.concurrent.ThreadPoolExecutor$Worker.run() (ThreadPoolExecutor.java:636) I/zygote (20925): at void java.lang.Thread.run() (Thread.java:764) I/zygote (20925): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.huawei.hms.api.HuaweiApiClient$ConnectionCallbacks" on path: DexPathList[[zip file "/data/app/live.crossword-zMxOfe7EMxqwG3Ct_ea4hQ==/base.apk"],nativeLibraryDirectories=[/data/app/live.crossword-zMxOfe7EMxqwG3Ct_ea4hQ==/lib/x86, /data/app/live.crossword-zMxOfe7EMxqwG3Ct_ea4hQ==/base.apk!/lib/x86, /system/lib, /vendor/lib]] I/zygote (20925): at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:125) I/zygote (20925): at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:379) I/zygote (20925): at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312) I/zygote (20925): at boolean com.huawei.hms.ads.jc.I() ((null):-1) I/zygote (20925): at void com.huawei.openalliance.ad.inter.HiAd$2.run() ((null):-1) I/zygote (20925): at void com.huawei.hms.ads.kx.run() ((null):-1) I/zygote (20925): at void java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) (ThreadPoolExecutor.java:1162) I/zygote (20925): at void java.util.concurrent.ThreadPoolExecutor$Worker.run() (ThreadPoolExecutor.java:636) I/zygote (20925): at void java.lang.Thread.run() (Thread.java:764) I/zygote (20925): I/zygote (20925): Rejecting re-init on previously-failed class java.lang.Class: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/huawei/hms/api/HuaweiApiClient$ConnectionCallbacks; I/zygote (20925): at boolean com.huawei.hms.ads.jc.I() ((null):-1) I/zygote (20925): at void com.huawei.openalliance.ad.inter.HiAd$2.run() ((null):-1) I/zygote (20925): at void com.huawei.hms.ads.kx.run() ((null):-1) I/zygote (20925): at void java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) (ThreadPoolExecutor.java:1162) I/zygote (20925): at void java.util.concurrent.ThreadPoolExecutor$Worker.run() (ThreadPoolExecutor.java:636) I/zygote (20925): at void java.lang.Thread.run() (Thread.java:764) I/zygote (20925): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.huawei.hms.api.HuaweiApiClient$ConnectionCallbacks" on path: DexPathList[[zip file "/data/app/live.crossword-zMxOfe7EMxqwG3Ct_ea4hQ==/base.apk"],nativeLibraryDirectories=[/data/app/live.crossword-zMxOfe7EMxqwG3Ct_ea4hQ==/lib/x86, /data/app/live.crossword-zMxOfe7EMxqwG3Ct_ea4hQ==/base.apk!/lib/x86, /system/lib, /vendor/lib]] I/zygote (20925): at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:125) I/zygote (20925): at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:379) I/zygote (20925): at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312) I/zygote (20925): at boolean com.huawei.hms.ads.jc.I() ((null):-1) I/zygote (20925): at void com.huawei.openalliance.ad.inter.HiAd$2.run() ((null):-1) I/zygote (20925): at void com.huawei.hms.ads.kx.run() ((null):-1) I/zygote (20925): at void java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) (ThreadPoolExecutor.java:1162) I/zygote (20925): at void java.util.concurrent.ThreadPoolExecutor$Worker.run() (ThreadPoolExecutor.java:636) I/zygote (20925): at void java.lang.Thread.run() (Thread.java:764) I/zygote (20925): I/zygote (20925): Rejecting re-init on previously-failed class java.lang.Class: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/huawei/hms/api/HuaweiApiClient$ConnectionCallbacks; I/zygote (20925): at boolean com.huawei.hms.ads.jc.I() ((null):-1) I/zygote (20925): at void com.huawei.openalliance.ad.inter.HiAd$2.run() ((null):-1) I/zygote (20925): at void com.huawei.hms.ads.kx.run() ((null):-1) I/zygote (20925): at void java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) (ThreadPoolExecutor.java:1162) I/zygote (20925): at void java.util.concurrent.ThreadPoolExecutor$Worker.run() (ThreadPoolExecutor.java:636) I/zygote (20925): at void java.lang.Thread.run() (Thread.java:764) I/zygote (20925): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.huawei.hms.api.HuaweiApiClient$ConnectionCallbacks" on path: DexPathList[[zip file "/data/app/live.crossword-zMxOfe7EMxqwG3Ct_ea4hQ==/base.apk"],nativeLibraryDirectories=[/data/app/live.crossword-zMxOfe7EMxqwG3Ct_ea4hQ==/lib/x86, /data/app/live.crossword-zMxOfe7EMxqwG3Ct_ea4hQ==/base.apk!/lib/x86, /system/lib, /vendor/lib]] I/zygote (20925): at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:125) I/zygote (20925): at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:379) I/zygote (20925): at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312) I/zygote (20925): at boolean com.huawei.hms.ads.jc.I() ((null):-1) I/zygote (20925): at void com.huawei.openalliance.ad.inter.HiAd$2.run() ((null):-1) I/zygote (20925): at void com.huawei.hms.ads.kx.run() ((null):-1) I/zygote (20925): at void java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) (ThreadPoolExecutor.java:1162) I/zygote (20925): at void java.util.concurrent.ThreadPoolExecutor$Worker.run() (ThreadPoolExecutor.java:636) I/zygote (20925): at void java.lang.Thread.run() (Thread.java:764) I/zygote (20925): D/EGL_emulation(20925): eglMakeCurrent: 0xa37143c0: ver 3 0 (tinfo 0x8fc7ec30) W/HiAdSDK.HMSConnectProcessor(20925): check hms sdk available error I/HiAdSDK.HiAd(20925): ppskit api is not included I/flutter (20925): isFullWidthSize : false I/flutter (20925): isDynamicSize : false I/flutter (20925): isAutoHeightSize : false I/EventChannelFactory(20925): EventChannel is created I/Banner (20925): Banner view initialized I/HiAdSDK.j(20925): setBannerAdSize width: 320 height: 50 I/Banner (20925): Banner ad size is set I/Banner (20925): Banner ad slot id is set I/Banner (20925): bannerRefreshTime set : 5000 I/AdParamFactory(20925): Create ad param begin W/FromMap (20925): toInteger | Integer value expected for gender W/FromMap (20925): toString | Non-empty String expected for adContentClassification W/FromMap (20925): toInteger | Integer value expected for tagForChildProtection W/FromMap (20925): toInteger | Integer value expected for tagForUnderAgeOfPromise W/FromMap (20925): toInteger | Integer value expected for nonPersonalizedAd W/FromMap (20925): toString | Non-empty String expected for appCountry W/FromMap (20925): toString | Non-empty String expected for appLang W/FromMap (20925): toString | Non-empty String expected for countryCode W/AdParamFactory(20925): Invalid gender value I/HiAdSDK.j(20925): load banner E/ActivityThread(20925): Failed to find provider info for com.huawei.hwid.pps.apiprovider W/HiAdSDK.LocationUtils(20925): loc_tag isBaseLocationSwitch, cursor is null I/HiAdSDK.LocationUtils(20925): loc_tag sendAsyncLocationByNative failed because switch is off I/Banner (20925): Banner ad is being prepared. I/EventChannelFactory(20925): EventChannel is created I/EventChannelFactory(20925): EventChannel is created I/Interstitial(20925): Interstitial ad initialized E/ActivityThread(20925): Failed to find provider info for com.huawei.hwid.pps.apiprovider W/HiAdSDK.LocationUtils(20925): loc_tag isBaseLocationSwitch, cursor is null I/HiAdSDK.LocationUtils(20925): loc_tag isLocationAvailable = false, return null I/Interstitial(20925): Interstitial ad is loading I/Interstitial(20925): Interstitial ad slot id set I/AdParamFactory(20925): Create ad param begin W/FromMap (20925): toInteger | Integer value expected for gender W/FromMap (20925): toString | Non-empty String expected for adContentClassification W/FromMap (20925): toInteger | Integer value expected for tagForChildProtection W/FromMap (20925): toInteger | Integer value expected for tagForUnderAgeOfPromise W/FromMap (20925): toInteger | Integer value expected for nonPersonalizedAd W/FromMap (20925): toString | Non-empty String expected for appCountry W/FromMap (20925): toString | Non-empty String expected for appLang W/FromMap (20925): toString | Non-empty String expected for countryCode W/AdParamFactory(20925): Invalid gender value I/HiAdSDK.Decouple.PPSApiServiceManager(20925): call remote method: reqNativeAd I/HiAdSDK.Decouple.PPSApiServiceManager(20925): bindService 1605702413323 I/HiAdSDK.HiAdTools(20925): current connected service pkg: null E/ActivityThread(20925): Failed to find provider info for com.huawei.hwid.pps.apiprovider W/HiAdSDK.LocationUtils(20925): loc_tag isBaseLocationSwitch, cursor is null I/HiAdSDK.LocationUtils(20925): loc_tag sendAsyncLocationByNative failed because switch is off W/HiAdSDK.ApkUtil(20925): getPackageInfo NameNotFoundException E/ActivityThread(20925): Failed to find provider info for com.huawei.hwid.pps.apiprovider W/HiAdSDK.LocationUtils(20925): loc_tag isBaseLocationSwitch, cursor is null I/HiAdSDK.LocationUtils(20925): loc_tag isLocationAvailable = false, return null W/HiAdSDK.ApkUtil(20925): getPackageInfo NameNotFoundException I/HiAdSDK.HiAdTools(20925): isSupportHmsAdsService hms ver: 0 I/HiAdSDK.HiAdTools(20925): hms is not installed or hms version is too low, version is: 0 I/HiAdSDK.Decouple.PPSApiServiceManager(20925): call remote method: interstitial_ad_load W/HiAdSDK.HiAdTools(20925): inner pps core service not available I/HiAdSDK.Decouple.PPSApiServiceManager(20925): bindService 1605702413336 I/HiAdSDK.HiAdTools(20925): current connected service pkg: null W/HiAdSDK.ApkUtil(20925): getPackageInfo NameNotFoundException I/HiAdSDK.Decouple.PPSApiServiceManager(20925): bind service pkg: com.huawei.hwid W/HiAdSDK.ApkUtil(20925): getPackageInfo NameNotFoundException I/HiAdSDK.Decouple.PPSApiServiceManager(20925): bind service result: false W/HiAdSDK.Decouple.PPSApiServiceManager(20925): onServiceCallFailed W/HiAdSDK.ApkUtil(20925): getPackageInfo NameNotFoundException I/HiAdSDK.Decouple.PPSApiServiceManager(20925): call reqNativeAd code: -1 msg: onServiceCallFailed I/HiAdSDK.HiAdTools(20925): isSupportHmsAdsService hms ver: 0 I/HiAdSDK.HiAdTools(20925): hms is not installed or hms version is too low, version is: 0 W/HiAdSDK.Decouple.PPSApiServiceManager(20925): onServiceCallFailed I/HiAdSDK.Decouple.PPSApiServiceManager(20925): call interstitial_ad_load code: -1 msg: onServiceCallFailed W/HiAdSDK.HiAdTools(20925): inner pps core service not available W/HiAdSDK.ApkUtil(20925): getPackageInfo NameNotFoundException I/HiAdSDK.Decouple.PPSApiServiceManager(20925): bind service pkg: com.huawei.hwid I/HiAdSDK.Decouple.PPSApiServiceManager(20925): bind service result: false I/Interstitial(20925): Interstitial ad is being prepared. I/HiAdSDK.Decouple.PPSApiServiceManager(20925): call remote method: reqConfig I/HiAdSDK.Decouple.PPSApiServiceManager(20925): bindService 1605702413347 I/HiAdSDK.HiAdTools(20925): current connected service pkg: null I/HiAdSDK.h(20925): onAdFailed, errorCode:-1 W/Interstitial(20925): onInterstitialAdFailed: 2 I/HiAdSDK.Decouple.PPSApiServiceManager(20925): call remote method: apistatistics W/HiAdSDK.ApkUtil(20925): getPackageInfo NameNotFoundException I/HiAdSDK.Decouple.PPSApiServiceManager(20925): bindService 1605702413352 I/HiAdSDK.HiAdTools(20925): current connected service pkg: null W/HiAdSDK.ApkUtil(20925): getPackageInfo NameNotFoundException I/HiAdSDK.HiAdTools(20925): isSupportHmsAdsService hms ver: 0 I/HiAdSDK.HiAdTools(20925): hms is not installed or hms version is too low, version is: 0 W/HiAdSDK.ApkUtil(20925): getPackageInfo NameNotFoundException I/HiAdSDK.Decouple.PPSApiServiceManager(20925): call remote method: reqConfig W/HiAdSDK.ApkUtil(20925): getPackageInfo NameNotFoundException I/HiAdSDK.Decouple.PPSApiServiceManager(20925): bindService 1605702413361 W/HiAdSDK.HiAdTools(20925): inner pps core service not available I/HiAdSDK.HiAdTools(20925): current connected service pkg: null I/HiAdSDK.HiAdTools(20925): isSupportHmsAdsService hms ver: 0 I/HiAdSDK.HiAdTools(20925): hms is not installed or hms version is too low, version is: 0 W/HiAdSDK.HiAdTools(20925): inner pps core service not available W/HiAdSDK.ApkUtil(20925): getPackageInfo NameNotFoundException I/HiAdSDK.Decouple.PPSApiServiceManager(20925): bind service pkg: com.huawei.hwid W/HiAdSDK.ApkUtil(20925): getPackageInfo NameNotFoundException W/HiAdSDK.ApkUtil(20925): getPackageInfo NameNotFoundException I/HiAdSDK.Decouple.PPSApiServiceManager(20925): bind service pkg: com.huawei.hwid W/HiAdSDK.ApkUtil(20925): getPackageInfo NameNotFoundException I/HiAdSDK.HiAdTools(20925): isSupportHmsAdsService hms ver: 0 I/HiAdSDK.HiAdTools(20925): hms is not installed or hms version is too low, version is: 0 I/HiAdSDK.Decouple.PPSApiServiceManager(20925): bind service result: false I/HiAdSDK.Decouple.PPSApiServiceManager(20925): bind service result: false W/HiAdSDK.HiAdTools(20925): inner pps core service not available W/HiAdSDK.Decouple.PPSApiServiceManager(20925): onServiceCallFailed W/HiAdSDK.Decouple.PPSApiServiceManager(20925): onServiceCallFailed W/HiAdSDK.ApkUtil(20925): getPackageInfo NameNotFoundException I/HiAdSDK.Decouple.PPSApiServiceManager(20925): call reqConfig code: -1 msg: onServiceCallFailed I/HiAdSDK.Decouple.PPSApiServiceManager(20925): bind service pkg: com.huawei.hwid W/HiAdSDK.Decouple.PPSApiServiceManager(20925): onServiceCallFailed I/HiAdSDK.Decouple.PPSApiServiceManager(20925): call apistatistics code: -1 msg: onServiceCallFailed I/HiAdSDK.Decouple.PPSApiServiceManager(20925): call reqConfig code: -1 msg: onServiceCallFailed W/HiAdSDK.Decouple.PPSApiServiceManager(20925): onServiceCallFailed I/HiAdSDK.Decouple.PPSApiServiceManager(20925): bind service result: false W/HiAdSDK.Decouple.PPSApiServiceManager(20925): onServiceCallFailed I/HiAdSDK.Decouple.PPSApiServiceManager(20925): call apistatistics code: -1 msg: onServiceCallFailed W/HiAdSDK.Decouple.PPSApiServiceManager(20925): onServiceCallFailed I/HiAdSDK.Decouple.PPSApiServiceManager(20925): call reqConfig code: -1 msg: onServiceCallFailed W/HiAdSDK.Decouple.PPSApiServiceManager(20925): onServiceCallFailed I/HiAdSDK.Decouple.PPSApiServiceManager(20925): call reqConfig code: -1 msg: onServiceCallFailed I/HiAdSDK.Decouple.PPSApiServiceManager(20925): call apistatistics code: -1 msg: onServiceCallFailed W/HiAdSDK.Decouple.PPSApiServiceManager(20925): onServiceCallFailed I/HiAdSDK.Decouple.PPSApiServiceManager(20925): call reqConfig code: -1 msg: onServiceCallFailed W/HiAdSDK.Decouple.PPSApiServiceManager(20925): onServiceCallFailed E/HiAdSDK.EvtProcessor(20925): api statistics report to hms failed I/HiAdSDK.Decouple.PPSApiServiceManager(20925): call reqConfig code: -1 msg: onServiceCallFailed E/HiAdSDK.EvtProcessor(20925): api statistics report to hms failed E/HiAdSDK.EvtProcessor(20925): api statistics report to hms failed W/BannerStreamHandler(20925): onBannerAdFailed: 2 I/HiAdSDK.Decouple.PPSApiServiceManager(20925): call remote method: apistatistics I/HiAdSDK.Decouple.PPSApiServiceManager(20925): bindService 1605702413375 I/HiAdSDK.HiAdTools(20925): current connected service pkg: null W/HiAdSDK.ApkUtil(20925): getPackageInfo NameNotFoundException W/HiAdSDK.ApkUtil(20925): getPackageInfo NameNotFoundException I/HiAdSDK.HiAdTools(20925): isSupportHmsAdsService hms ver: 0 I/HiAdSDK.HiAdTools(20925): hms is not installed or hms version is too low, version is: 0 W/HiAdSDK.HiAdTools(20925): inner pps core service not available W/HiAdSDK.ApkUtil(20925): getPackageInfo NameNotFoundException I/HiAdSDK.Decouple.PPSApiServiceManager(20925): bind service pkg: com.huawei.hwid I/HiAdSDK.Decouple.PPSApiServiceManager(20925): bind service result: false W/HiAdSDK.Decouple.PPSApiServiceManager(20925): onServiceCallFailed I/HiAdSDK.Decouple.PPSApiServiceManager(20925): call apistatistics code: -1 msg: onServiceCallFailed E/HiAdSDK.EvtProcessor(20925): api statistics report to hms failed I/zygote (20925): Do partial code cache collection, code=25KB, data=30KB I/zygote (20925): After code cache collection, code=25KB, data=30KB I/zygote (20925): Increasing code cache capacity to 128KB I/flutter (20925): widthPx : 960 I/flutter (20925): Banner Ad event : AdEvent.failed I/flutter (20925): heightPx : 150 I/flutter (20925): getCurrentDirectionBannerSize - width 150 : height 50 I/flutter (20925): getLandscapeBannerSize - width 150 : height 50 I/flutter (20925): getPortraitBannerSize - width 150 : height 50

sinan-aktepe commented 3 years ago

You can't see the ad because your device brand is not Huawei. For details, please refer here.

But you can test your app in AppGallery Connect with Cloud Debugging.

Here are the steps to test your app on the cloud:

  1. Sign in to AppGallery Connect.
  2. Go to My Projects page and select your project. Create one if there's not.
  3. Under Quality, you can see the Cloud Debugging option.
  4. Pick a device here, then upload your output apk file.

You can check here if the ads are being displayed as they should.

xz013 commented 3 years ago

really big thank you for helping me , but i got this new error :

App installation failed. Error code: com.android.ddmlib.InstallException: INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113

i don't know how i can fix it https://prnt.sc/vmbfeh

xz013 commented 3 years ago

All works thank you very much