私のフラッターアプリでは、Google広告がAndroidアプリにロードされていませんが、iosで動作します. 私は AdMob と Firebase Database の両方を使用しており、Macbook pro M1 を使用しており、anroid エミュレーターは ( https://github.com/741g/android-emulator-m1-preview/releases/tag/0.1 ) からダウンロードされます。次のエラーが発生します。しばらくしてロードされなかった後、一度ロードされました。エミュレータを再起動しました。
エラーログ
✓ Built build/app/outputs/flutter-apk/app-debug.apk.
Debug service listening on ws://127.0.0.1:58954/IMxJrHvKw0s=/ws
Syncing files to device Android SDK built for arm64...
W/GooglePlayServicesUtil( 7635): com.example.com requires the Google Play Store, but it is missing.
****E/DynamiteModule( 7635): Failed to load IDynamiteLoader from GmsCore: Application package com.google.android.gms not found****
I/WebViewFactory( 7635): Loading com.android.webview version 83.0.4103.120 (code 410412053)
D/nativeloader( 7635): classloader namespace configured for unbundled product apk. library_path=/product/app/webview/lib/arm64:/product/app/webview/webview.apk!/lib/arm64-v8a:/product/lib64:/system/product/lib64
I/com.example.com( 7635): Waiting for a blocking GC ClassLinker
I/com.example.com( 7635): WaitForGcToComplete blocked ClassLinker on ClassLinker for 7.565ms
I/cr_LibraryLoader( 7635): Loaded native library version number "83.0.4103.120"
I/cr_CachingUmaRecorder( 7635): Flushed 3 samples from 3 histograms.
I/cr_VariationsUtils( 7635): Requesting new seed from IVariationsSeedServer
W/com.example.com( 7635): Accessing hidden method Landroid/media/AudioManager;->getOutputLatency(I)I (unsupported, reflection, allowed)
D/HostConnection( 7635): createUnique: call
D/HostConnection( 7635): HostConnection::get() New Host Connection established 0x7b216f9110, tid 7755
W/cr_media( 7635): Requires BLUETOOTH permission
W/GooglePlayServicesUtil( 7635): com.example.com requires the Google Play Store, but it is missing.
W/GooglePlayServicesUtil( 7635): com.example.com requires the Google Play Store, but it is missing.
D/HostConnection( 7635): HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_async_frame_commands ANDROID_EMU_gles_max_version_3_0
W/Chrome_InProcGp( 7635): type=1400 audit(0.0:928): avc: denied { create } for scontext=u:r:untrusted_app:s0:c123,c256,c512,c768 tcontext=u:r:untrusted_app:s0:c123,c256,c512,c768 tclass=vsock_socket permissive=0 app=com.example.com
D/EGL_emulation( 7635): eglCreateContext: 0x7b31726d30: maj 3 min 0 rcv 3
D/EGL_emulation( 7635): eglMakeCurrent: 0x7b31726d30: ver 3 0 (tinfo 0x7ac177ec18) (first time)
W/Chrome_InProcGp( 7635): type=1400 audit(0.0:929): avc: denied { create } for scontext=u:r:untrusted_app:s0:c123,c256,c512,c768 tcontext=u:r:untrusted_app:s0:c123,c256,c512,c768 tclass=vsock_socket permissive=0 app=com.example.com
I/flutter ( 7635): [2021-05-16 12:15:16.253778 | Catcher | FINE] Using debug config
I/flutter ( 7635): [2021-05-16 12:15:16.270505 | Catcher | WARNING] Screenshots path is empty. Screenshots won't work.
I/flutter ( 7635): [2021-05-16 12:15:16.280954 | Catcher | FINE] Catcher configured successfully.
I/flutter ( 7635): [2021-05-16 12:15:19.025932 | Catcher | INFO] Setup localization lazily!
I/flutter ( 7635): [2021-05-16 12:15:19.095563 | DiscordHandler | INFO] Sending request to Discord server...
I/flutter ( 7635): [2021-05-16 12:15:19.099199 | DiscordHandler | INFO] Sending request to Discord server...
I/flutter ( 7635): [2021-05-16 12:15:19.756470 | DiscordHandler | INFO] Server responded with code: 204 and message: No Content
I/flutter ( 7635): [2021-05-16 12:15:19.756650 | Catcher | INFO] Report result: true
I/flutter ( 7635): [2021-05-16 12:15:19.790840 | DiscordHandler | INFO] Server responded with code: 204 and message: No Content
I/flutter ( 7635): [2021-05-16 12:15:19.792818 | Catcher | INFO] Report result: true
W/GooglePlayServicesUtil( 7635): com.example.com requires the Google Play Store, but it is missing.
**E/DynamiteModule( 7635): Failed to load IDynamiteLoader from GmsCore: Application package com.google.android.gms not found**
I/Ads ( 7635): Use RequestConfiguration.Builder().setTestDeviceIds(Arrays.asList("0C722C5BD4C3702E3B9AC5D6D2F52F51") to get test ads on this device.
**E/DynamiteModule( 7635): Failed to load IDynamiteLoader from GmsCore: Application package com.google.android.gms not found**
I/DynamiteModule( 7635): Considering local module com.google.android.gms.ads.dynamite:204204100 and remote module com.google.android.gms.ads.dynamite:0
I/DynamiteModule( 7635): Selected local version of com.google.android.gms.ads.dynamite
W/GooglePlayServicesUtil( 7635): Google Play services is missing.
W/GooglePlayServicesUtil( 7635): com.example.com requires the Google Play Store, but it is missing.
D/zzfc ( 7635): File /data/user/0/com.example.com/cache/1608138930680.dex not found. No need for deletion
**E/DynamiteModule( 7635): Failed to load IDynamiteLoader from GmsCore: Application package com.google.android.gms not found**
I/DynamiteModule( 7635): Considering local module com.google.android.gms.ads.dynamite:204204100 and remote module com.google.android.gms.ads.dynamite:0
I/DynamiteModule( 7635): Selected local version of com.google.android.gms.ads.dynamite
W/Ads ( 7635): #007 Could not call remote method. @28
W/Ads ( 7635): com.google.android.gms.internal.ads.zzazl: com.google.android.gms.dynamite.DynamiteModule$LoadingException: Failed to instantiate module class: com.google.android.gms.ads.omid.DynamiteOmid
W/Ads ( 7635): at com.google.android.gms.internal.ads.zzazj.zza(com.google.android.gms:play-services-ads-lite@@19.7.0:3)
W/Ads ( 7635): at com.google.android.gms.internal.ads.zzarl.zzn(com.google.android.gms:play-services-ads-lite@@19.7.0:22)
W/Ads ( 7635): at com.google.android.gms.internal.ads.zzarl.getVersion(com.google.android.gms:play-services-ads-lite@@19.7.0:31)
W/Ads ( 7635): at com.google.android.gms.internal.ads.zzddx.zzatj(com.google.android.gms:play-services-ads@@19.7.0:10)
W/Ads ( 7635): at com.google.android.gms.internal.ads.zzddw.call(Unknown Source:2)
W/Ads ( 7635): at com.google.android.gms.internal.ads.zzeaj.zzbab(com.google.android.gms:play-services-ads@@19.7.0:5)
W/Ads ( 7635): at com.google.android.gms.internal.ads.zzdzs.run(com.google.android.gms:play-services-ads@@19.7.0:8)
W/Ads ( 7635): at com.google.android.gms.internal.ads.zzeah.run(com.google.android.gms:play-services-ads@@19.7.0:11)
W/Ads ( 7635): at com.google.android.gms.internal.ads.zzazu.execute(com.google.android.gms:play-services-ads@@19.7.0:4)
W/Ads ( 7635): at com.google.android.gms.internal.ads.zzazt.execute(com.google.android.gms:play-services-ads@@19.7.0:4)
W/Ads ( 7635): at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
W/Ads ( 7635): at com.google.android.gms.internal.ads.zzdyl.zze(com.google.android.gms:play-services-ads@@19.7.0:5)
W/Ads ( 7635): at com.google.android.gms.internal.ads.zzddx.zzasy(com.google.android.gms:play-services-ads@@19.7.0:6)
W/Ads ( 7635): at com.google.android.gms.internal.ads.zzdfl.zzs(com.google.android.gms:play-services-ads@@19.7.0:7)
W/Ads ( 7635): at com.google.android.gms.internal.ads.zzbqu.zzali(com.google.android.gms:play-services-ads@@19.7.0:12)
W/Ads ( 7635): at com.google.android.gms.internal.ads.zzbqu.zzalj(com.google.android.gms:play-services-ads@@19.7.0:13)
W/Ads ( 7635): at com.google.android.gms.internal.ads.zzbou.zzala(com.google.android.gms:play-services-ads@@19.7.0:34)
W/Ads ( 7635): at com.google.android.gms.internal.ads.zzbou.zzalb(com.google.android.gms:play-services-ads@@19.7.0:54)
W/Ads ( 7635): at com.google.android.gms.internal.ads.zzdje.zza(com.google.android.gms:play-services-ads@@19.7.0:71)
W/Ads ( 7635): at com.google.android.gms.internal.ads.zzcxw.zzg(com.google.android.gms:play-services-ads@@19.7.0:26)
W/Ads ( 7635): at com.google.android.gms.internal.ads.zzcxw.zza(com.google.android.gms:play-services-ads@@19.7.0:13)
W/Ads ( 7635): at com.google.android.gms.internal.ads.zzzm.zza(com.google.android.gms:play-services-ads-lite@@19.7.0:123)
W/Ads ( 7635): at com.google.android.gms.ads.BaseAdView.loadAd(com.google.android.gms:play-services-ads-lite@@19.7.0:15)
W/Ads ( 7635): at com.google.android.gms.ads.AdView.loadAd(com.google.android.gms:play-services-ads-lite@@19.7.0:20)
W/Ads ( 7635): at io.flutter.plugins.googlemobileads.FlutterBannerAd.load(FlutterBannerAd.java:86)
W/Ads ( 7635): at io.flutter.plugins.googlemobileads.GoogleMobileAdsPlugin.onMethodCall(GoogleMobileAdsPlugin.java:266)
W/Ads ( 7635): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:233)
W/Ads ( 7635): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85)
W/Ads ( 7635): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:818)
W/Ads ( 7635): at android.os.MessageQueue.nativePollOnce(Native Method)
W/Ads ( 7635): at android.os.MessageQueue.next(MessageQueue.java:335)
W/Ads ( 7635): at android.os.Looper.loop(Looper.java:183)
W/Ads ( 7635): at android.app.ActivityThread.main(ActivityThread.java:7660)
W/Ads ( 7635): at java.lang.reflect.Method.invoke(Native Method)
W/Ads ( 7635): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
W/Ads ( 7635): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:975)
W/Ads ( 7635): Caused by: com.google.android.gms.dynamite.DynamiteModule$LoadingException: Failed to instantiate module class: com.google.android.gms.ads.omid.DynamiteOmid
W/Ads ( 7635): at com.google.android.gms.dynamite.DynamiteModule.instantiate(com.google.android.gms:play-services-basement@@17.3.0:260)
W/Ads ( 7635): at com.google.android.gms.internal.ads.zzazj.zza(com.google.android.gms:play-services-ads-lite@@19.7.0:1)
W/Ads ( 7635): ... 35 more
W/Ads ( 7635): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.ads.omid.DynamiteOmid" on path: DexPathList[[zip file "/data/app/~~XTOLiYep8dZhgoF0J8AZXg==/com.example.com-hDko_XnXqo17zlbMET3Bkg==/base.apk"],nativeLibraryDirectories=[/data/app/~~XTOLiYep8dZhgoF0J8AZXg==/com.example.com-hDko_XnXqo17zlbMET3Bkg==/lib/arm64, /data/app/~~XTOLiYep8dZhgoF0J8AZXg==/com.example.com-hDko_XnXqo17zlbMET3Bkg==/base.apk!/lib/arm64-v8a, /system/lib64, /system_ext/lib64]]
W/Ads ( 7635): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:207)
W/Ads ( 7635): at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
W/Ads ( 7635): at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
W/Ads ( 7635): at com.google.android.gms.dynamite.DynamiteModule.instantiate(com.google.android.gms:play-services-basement@@17.3.0:257)
W/Ads ( 7635): ... 36 more
W/Ads ( 7635): #007 Could not call remote method. @28
W/Ads ( 7635): java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.String com.google.android.gms.internal.ads.zzdst.getVersion()' on a null object reference
W/Ads ( 7635): at com.google.android.gms.internal.ads.zzarl.getVersion(com.google.android.gms:play-services-ads-lite@@19.7.0:32)
W/Ads ( 7635): at com.google.android.gms.internal.ads.zzddx.zzatj(com.google.android.gms:play-services-ads@@19.7.0:10)
W/Ads ( 7635): at com.google.android.gms.internal.ads.zzddw.call(Unknown Source:2)
W/Ads ( 7635): at com.google.android.gms.internal.ads.zzeaj.zzbab(com.google.android.gms:play-services-ads@@19.7.0:5)
W/Ads ( 7635): at com.google.android.gms.internal.ads.zzdzs.run(com.google.android.gms:play-services-ads@@19.7.0:8)
W/Ads ( 7635): at com.google.android.gms.internal.ads.zzeah.run(com.google.android.gms:play-services-ads@@19.7.0:11)
W/Ads ( 7635): at com.google.android.gms.internal.ads.zzazu.execute(com.google.android.gms:play-services-ads@@19.7.0:4)
W/Ads ( 7635): at com.google.android.gms.internal.ads.zzazt.execute(com.google.android.gms:play-services-ads@@19.7.0:4)
W/Ads ( 7635): at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
W/Ads ( 7635): at com.google.android.gms.internal.ads.zzdyl.zze(com.google.android.gms:play-services-ads@@19.7.0:5)
W/Ads ( 7635): at com.google.android.gms.internal.ads.zzddx.zzasy(com.google.android.gms:play-services-ads@@19.7.0:6)
W/Ads ( 7635): at com.google.android.gms.internal.ads.zzdfl.zzs(com.google.android.gms:play-services-ads@@19.7.0:7)
W/Ads ( 7635): at com.google.android.gms.internal.ads.zzbqu.zzali(com.google.android.gms:play-services-ads@@19.7.0:12)
W/Ads ( 7635): at com.google.android.gms.internal.ads.zzbqu.zzalj(com.google.android.gms:play-services-ads@@19.7.0:13)
W/Ads ( 7635): at com.google.android.gms.internal.ads.zzbou.zzala(com.google.android.gms:play-services-ads@@19.7.0:34)
W/Ads ( 7635): at com.google.android.gms.internal.ads.zzbou.zzalb(com.google.android.gms:play-services-ads@@19.7.0:54)
W/Ads ( 7635): at com.google.android.gms.internal.ads.zzdje.zza(com.google.android.gms:play-services-ads@@19.7.0:71)
W/Ads ( 7635): at com.google.android.gms.internal.ads.zzcxw.zzg(com.google.android.gms:play-services-ads@@19.7.0:26)
W/Ads ( 7635): at com.google.android.gms.internal.ads.zzcxw.zza(com.google.android.gms:play-services-ads@@19.7.0:13)
W/Ads ( 7635): at com.google.android.gms.internal.ads.zzzm.zza(com.google.android.gms:play-services-ads-lite@@19.7.0:123)
W/Ads ( 7635): at com.google.android.gms.ads.BaseAdView.loadAd(com.google.android.gms:play-services-ads-lite@@19.7.0:15)
W/Ads ( 7635): at com.google.android.gms.ads.AdView.loadAd(com.google.android.gms:play-services-ads-lite@@19.7.0:20)
W/Ads ( 7635): at io.flutter.plugins.googlemobileads.FlutterBannerAd.load(FlutterBannerAd.java:86)
W/Ads ( 7635): at io.flutter.plugins.googlemobileads.GoogleMobileAdsPlugin.onMethodCall(GoogleMobileAdsPlugin.java:266)
W/Ads ( 7635): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:233)
W/Ads ( 7635): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85)
W/Ads ( 7635): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:818)
W/Ads ( 7635): at android.os.MessageQueue.nativePollOnce(Native Method)
W/Ads ( 7635): at android.os.MessageQueue.next(MessageQueue.java:335)
W/Ads ( 7635): at android.os.Looper.loop(Looper.java:183)
W/Ads ( 7635): at android.app.ActivityThread.main(ActivityThread.java:7660)
W/Ads ( 7635): at java.lang.reflect.Method.invoke(Native Method)
W/Ads ( 7635): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
W/Ads ( 7635): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:975)
**E/DynamiteModule( 7635): Failed to load IDynamiteLoader from GmsCore: Application package com.google.android.gms not found**
W/PlatformVersion( 7635): Build version must be at least 6301457 to support R in gmscore
I/Ads ( 7635): Ad failed to load : 0
I/flutter ( 7635): Ad failed to load: LoadAdError(code: 0, domain: com.google.android.gms.ads, message: Internal error.)
D/EGL_emulation( 7635): eglMakeCurrent: 0x7b31716db0: ver 3 0 (tinfo 0x7ac1723298) (first time)
W/Gralloc4( 7635): allocator 3.x is not supported
W/com.example.com( 7635): type=1400 audit(0.0:936): avc: denied { create } for scontext=u:r:untrusted_app:s0:c123,c256,c512,c768 tcontext=u:r:untrusted_app:s0:c123,c256,c512,c768 tclass=vsock_socket permissive=0 app=com.example.com
app/build.gradle
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
compileSdkVersion 30
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.com"
minSdkVersion 28
targetSdkVersion 30
multiDexEnabled true
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
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
}
}
}
flutter {
source '../..'
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
// Lottie
implementation "com.airbnb.android:lottie:3.5.0"
implementation "com.android.support.constraint:constraint-layout:2.0.4"
implementation platform('com.google.firebase:firebase-bom:28.0.1')
implementation 'com.google.firebase:firebase-analytics'
}
アンドロイド/build.gradle
buildscript {
ext.kotlin_version = '1.3.50'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.8'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
フラッタードクター
[✓] Flutter (Channel stable, 2.0.6, on macOS 11.2.3 20D91 darwin-arm, locale en-IN)
• Flutter version 2.0.6 at /Users/mak/Desktop/Dev/flutter
• Framework revision 1d9032c7e1 (2 weeks ago), 2021-04-29 17:37:58 -0700
• Engine revision 05e680e202
• Dart version 2.12.3
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at /Users/mak/Library/Android/sdk
• Platform android-30, build-tools 30.0.3
• ANDROID_HOME = /Users/mak/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.4, Build version 12D4e
• CocoaPods version 1.10.1
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 4.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
[✓] VS Code (version 1.54.3)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension can be installed from:
https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[✓] Connected device (3 available)
• Android SDK built for arm64 (mobile) • emulator-5554 • android-arm64 • Android 11 (API 30) (emulator)
• iPhone 12 Pro Max (mobile) • 2F371B4A-6E20-4ECF-8DE1-06FB8266FCD8 • ios • com.apple.CoreSimulator.SimRuntime.iOS-14-4 (simulator)
• Chrome (web) • chrome • web-javascript • Google Chrome 90.0.4430.212
• No issues found!
Process finished with exit code 0