diff --git a/packages/google_mobile_ads/example/android/app/build.gradle b/packages/google_mobile_ads/example/android/app/build.gradle index 55a3b0117..fc0e073d4 100644 --- a/packages/google_mobile_ads/example/android/app/build.gradle +++ b/packages/google_mobile_ads/example/android/app/build.gradle @@ -25,7 +25,7 @@ apply plugin: 'com.android.application' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion 33 + compileSdkVersion 34 namespace 'io.flutter.plugins.googlemobileadsexample' @@ -36,7 +36,7 @@ android { defaultConfig { applicationId "io.flutter.plugins.googlemobileadsexample" minSdkVersion 21 - targetSdkVersion 33 + targetSdkVersion 34 versionCode flutterVersionCode.toInteger() versionName flutterVersionName testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" diff --git a/packages/google_mobile_ads/example/lib/inline_adaptive_example.dart b/packages/google_mobile_ads/example/lib/inline_adaptive_example.dart index 48709bae4..c6d4fc59e 100644 --- a/packages/google_mobile_ads/example/lib/inline_adaptive_example.dart +++ b/packages/google_mobile_ads/example/lib/inline_adaptive_example.dart @@ -14,6 +14,8 @@ // ignore_for_file: public_member_api_docs +import 'dart:io'; + import 'package:flutter/material.dart'; import 'package:google_mobile_ads/google_mobile_ads.dart'; import 'constants.dart'; @@ -55,7 +57,9 @@ class _InlineAdaptiveExampleState extends State { _adWidth.truncate()); _inlineAdaptiveAd = AdManagerBannerAd( - adUnitId: '/6499/example/adaptive-banner', + adUnitId: Platform.isAndroid + ? '/21775744923/example/banner' + : '/6499/example/adaptive-banner', sizes: [size], request: AdManagerAdRequest(), listener: AdManagerBannerAdListener(