SagarRawat Ответов: 0

Flutter admob ad не загружается даже через 5 дней, объявление не удалось загрузить


I am trying to implement add to my app but the apps are not showing don't know what is causing this,
I waited for 4 days still no ads are showing on my device, it shows ad failed to load 3,
even on emulator it shows ad failed to load 3.
don't know why is this happening,


<pre>    class ImagePath extends StatefulWidget {
    final String imgPath;
     ImagePath(this.imgPath);
     @override
     _ImagePathState createState() => _ImagePathState();
    }

    class _ImagePathState extends State<ImagePath> {
    String localPath;

    static final MobileAdTargetingInfo targetingInfo = MobileAdTargetingInfo(
    keywords: ["wallpaper","games"],
    childDirected: true,
     );
     BannerAd bannerAd = BannerAd(
      adUnitId: "ADUNIT-ID-HERE",
      size: AdSize.banner,
      targetingInfo: targetingInfo,
      listener: (MobileAdEvent event) {
        print("Banner shown");
      });

    @override
    void initState() {
    super.initState();
    bannerAd
      ..load()
      ..show(anchorType: AnchorType.bottom);
    FirebaseAdMob.instance
        .initialize(appId: "APP-ID-HERE");
    }

    @override
    void dispose() {
    bannerAd?.dispose();
    super.dispose();
    }

    Future<String> get localpath async {
    final result = await Permission.storage.request();
    if (result == PermissionStatus.granted) {
      final localPath =
          (await findLocalPath()) + Platform.pathSeparator + 'Download';
      final savedDir = Directory(localPath);
      bool hasExisted = await savedDir.exists();
      if (!hasExisted) {
        savedDir.create();
      }
      return localPath;
    } else
      return null;
    }

    Future<String> findLocalPath() async {
    final directory = Platform.isAndroid
        ? await getExternalStorageDirectory()
        : await getApplicationDocumentsDirectory();
    return directory.path;
    }

    @override
    Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: bgColor,
        leading: IconButton(
          icon: Icon(Icons.close),
          onPressed: () => Navigator.of(context).pop(),
          color: Colors.white,
        ),
        actions: [
          IconButton(
              color: Colors.white,
              icon: Icon(Icons.file_download),
              onPressed: () async => DownloadTask(
                  taskId: await FlutterDownloader.enqueue(
                      url: widget.imgPath,
                      savedDir: await localpath,
                      showNotification: true,
                      openFileFromNotification: true)))
        ],
      ),
      body: SizedBox.expand(
        child: Container(
          child: Stack(
            children: [
              Align(
                alignment: Alignment.center,
                child: Hero(
                    tag: widget.imgPath, child: Image.network(widget.imgPath)),
              ),
            ],
          ),
        ),
      ),
      backgroundColor: bgColor,
    );
    }
   }



код ошибки

I/art(22613): Caused by: java.lang.ClassNotFoundException: Didn't find class "android.webkit.RenderProcessGoneDetail" on path: DexPathList[[zip file "/system/app/Chrome/Chrome.apk"],nativeLibraryDirectories=[/system/app/Chrome/lib/arm64, /system/app/Chrome/Chrome.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64, /system/vendor/lib64, /system/lib64, /vendor/lib64, /system/vendor/lib64]]I/art     (22613): Caused by: java.lang.ClassNotFoundException: Didn't find class "android.webkit.RenderProcessGoneDetail" on path: DexPathList[[zip file "/system/app/Chrome/Chrome.apk"],nativeLibraryDirectories=[/system/app/Chrome/lib/arm64, /system/app/Chrome/Chrome.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64, /system/vendor/lib64, /system/lib64, /vendor/lib64, /system/vendor/lib64]]I/art(22613): Caused by: java.lang.ClassNotFoundException: Didn't find class "android.webkit.RenderProcessGoneDetail" on path: DexPathList[[zip file "/system/app/Chrome/Chrome.apk"],nativeLibraryDirectories=[/system/app/Chrome/lib/arm64, /system/app/Chrome/Chrome.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64, /system/vendor/lib64, /system/lib64, /vendor/lib64, /system/vendor/lib64]]I/art     (22613): Caused by: java.lang.ClassNotFoundException: Didn't find class "android.webkit.RenderProcessGoneDetail" on path: DexPathList[[zip file "/system/app/Chrome/Chrome.apk"],nativeLibraryDirectories=[/system/app/Chrome/lib/arm64, /system/app/Chrome/Chrome.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64, /system/vendor/lib64, /system/lib64, /vendor/lib64, /system/vendor/lib64]]


D/WebView (22613): addJavascriptInterface=googleAdsJsInterface
D/WebView (22613): removeJavascriptInterface=accessibility
D/WebView (22613): removeJavascriptInterface=accessibilityTraversal
D/WebView (22613): loadUrl=https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/production/sdk-core-v40-impl.html
W/cr_media(22613): Requires BLUETOOTH permission
W/Ads     (22613): Not retrying to fetch app settings
W/cr_CrashFileManager(22613): /data/user/0/sagarrawatuk.fotoApp/cache/WebView/Crash Reports does not     exist or is not a directory
E/libEGL  (22613): validate_display:99 error 3008 (EGL_BAD_DISPLAY)
D/libc-netbsd(22613): getaddrinfo: googleads.g.doubleclick.net get result from proxy gai_error = 0
W/VideoCapabilities(22613): Unrecognized profile/level 1/32 for video/mp4v-es
W/VideoCapabilities(22613): Unrecognized profile/level 32768/2 for video/mp4v-es
W/VideoCapabilities(22613): Unrecognized profile/level 32768/64 for video/mp4v-es
W/VideoCapabilities(22613): Unsupported mime video/x-ms-wmv
W/VideoCapabilities(22613): Unsupported mime video/divx
W/VideoCapabilities(22613): Unsupported mime video/divx3
W/VideoCapabilities(22613): Unsupported mime video/xvid
W/VideoCapabilities(22613): Unsupported mime video/flv1
W/VideoCapabilities(22613): Unrecognized profile/level 1/32 for video/mp4v-es
D/OpenSSLLib(22613): OpensslErr:Module:12(175:); file:external/boringssl/src/crypto/asn1/asn1_lib.c     ;Line:175;Function:ASN1_get_object
D/OpenSSLLib(22613): OpensslErr:Module:12(175:); file:external/boringssl/src/crypto/asn1/asn1_lib.c ;Line:175;Function:ASN1_get_object
I/VideoCapabilities(22613): Unsupported profile 4 for video/mp4v-es
W/cr_MediaCodecUtil(22613): HW encoder for video/avc is not available on this device.
I/art     (22613): Background partial concurrent mark sweep GC freed 18534(1105KB) AllocSpace     objects, 1(20KB) LOS objects, 35% free, 7MB/11MB, paused 5.279ms total 118.832ms
D/WebView (22613): evaluateJavascript=(function(){})()
D/WebView (22613): evaluateJavascript=google.afma.config.fetchAppSettings({"id":"ID-HERE","args":{"app_id":"APP-ID-HERE","is_init":true,"pn":"sagarrawatuk.fotoApp"}});
W/flutter (22613): onAdFailedToLoad: 3
I/Ads     (22613): Ad failed to load : 3


Что я уже пробовал:

Я пробовал ждать 4 - 5 дней , все равно добавить не загружается,

0 Ответов