Не загружается реклама Admob в Android Studio I/Ads: Ad failed to load : 0

89
03 февраля 2022, 21:20

Я пытаюсь вставить Admob рекламу в пустое приложение Android Studio. Я пытался как подключать проект к firebase самостоятельно, так и делать это через кнопку в Android Studio. Результат один и тот же. Баннер виден в prewiew в Android Studio, но при запуске на реальном устройстве не показывается и выдаётся ошибка I/Ads: Ad failed to load : 0 Id Проекта в firebase, id рекламного баннера и Device_ID тестового устройства(Samsung Galaxy a6+) - Правильные. Рекламный баннер создан более недели назад.

Logcat


2020-01-04 19:57:14.507 17363-17462/com.example.myapplication D/FA: Connected to remote service
2020-01-04 19:57:14.507 17363-17363/com.example.myapplication D/InputMethodManager: prepareNavigationBarInfo() DecorView@49abf2f[MainActivity]
2020-01-04 19:57:14.507 17363-17363/com.example.myapplication D/InputMethodManager: getNavigationBarColor() -855310
2020-01-04 19:57:14.508 17363-17363/com.example.myapplication V/InputMethodManager: Starting input: tba=com.example.myapplication ic=null mNaviBarColor -855310 mIsGetNaviBarColorSuccess true , NavVisible : true , NavTrans : false
2020-01-04 19:57:14.508 17363-17363/com.example.myapplication D/InputMethodManager: startInputInner - Id : 0
2020-01-04 19:57:14.511 17363-17462/com.example.myapplication V/FA: Processing queued up service tasks: 4
2020-01-04 19:57:14.547 17363-17520/com.example.myapplication I/chromium: [INFO:library_loader_hooks.cc(51)] Chromium logging enabled: level = 0, default verbosity = 0
2020-01-04 19:57:14.548 17363-17520/com.example.myapplication I/cr_LibraryLoader: Expected native library version number "78.0.3904.108", actual native library version number "78.0.3904.108"
2020-01-04 19:57:15.202 17363-17609/com.example.myapplication W/cr_ChildProcLH: Create a new ChildConnectionAllocator with package name = com.android.chrome, sandboxed = true
2020-01-04 19:57:15.302 17363-17609/com.example.myapplication W/e.myapplicatio: Accessing hidden method Landroid/content/Context;->bindServiceAsUser(Landroid/content/Intent;Landroid/content/ServiceConnection;ILandroid/os/Handler;Landroid/os/UserHandle;)Z (light greylist, reflection)
2020-01-04 19:57:15.360 17363-17363/com.example.myapplication I/cr_BrowserStartup: Initializing chromium process, singleProcess=false
2020-01-04 19:57:17.639 17363-17363/com.example.myapplication D/ConnectivityManager: requestNetwork; CallingUid : 10349, CallingPid : 17363
2020-01-04 19:57:17.649 17363-17363/com.example.myapplication D/ConnectivityManager: requestNetwork; CallingUid : 10349, CallingPid : 17363
2020-01-04 19:57:17.978 17363-17363/com.example.myapplication W/e.myapplicatio: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker;-><init>(Landroid/content/Context;I)V (light greylist, reflection)
2020-01-04 19:57:17.979 17363-17363/com.example.myapplication W/e.myapplicatio: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker;->logEvent(Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;)V (light greylist, reflection)
2020-01-04 19:57:17.980 17363-17363/com.example.myapplication W/e.myapplicatio: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionStarted(I)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (light greylist, reflection)
2020-01-04 19:57:17.980 17363-17363/com.example.myapplication W/e.myapplicatio: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionModified(II)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (light greylist, reflection)
2020-01-04 19:57:17.980 17363-17363/com.example.myapplication W/e.myapplicatio: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionModified(IILandroid/view/textclassifier/TextClassification;)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (light greylist, reflection)
2020-01-04 19:57:17.980 17363-17363/com.example.myapplication W/e.myapplicatio: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionModified(IILandroid/view/textclassifier/TextSelection;)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (light greylist, reflection)
2020-01-04 19:57:17.980 17363-17363/com.example.myapplication W/e.myapplicatio: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionAction(III)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (light greylist, reflection)
2020-01-04 19:57:17.980 17363-17363/com.example.myapplication W/e.myapplicatio: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionAction(IIILandroid/view/textclassifier/TextClassification;)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (light greylist, reflection)
2020-01-04 19:57:18.106 17363-17640/com.example.myapplication W/e.myapplicatio: Accessing hidden method Landroid/media/AudioManager;->getOutputLatency(I)I (light greylist, reflection)
2020-01-04 19:57:18.122 17363-17640/com.example.myapplication W/cr_media: Requires BLUETOOTH permission
2020-01-04 19:57:18.170 17363-17363/com.example.myapplication D/ConnectivityManager: requestNetwork; CallingUid : 10349, CallingPid : 17363
2020-01-04 19:57:18.174 17363-17363/com.example.myapplication D/ConnectivityManager: requestNetwork; CallingUid : 10349, CallingPid : 17363
2020-01-04 19:57:18.275 17363-17656/com.example.myapplication W/AudioCapabilities: Unsupported mime audio/ac4
2020-01-04 19:57:18.279 17363-17656/com.example.myapplication W/AudioCapabilities: Unsupported mime audio/x-ima
2020-01-04 19:57:18.295 17363-17656/com.example.myapplication W/AudioCapabilities: Unsupported mime audio/eac3-joc
2020-01-04 19:57:18.313 17363-17656/com.example.myapplication W/AudioCapabilities: Unsupported mime audio/mpeg-L1
2020-01-04 19:57:18.315 17363-17656/com.example.myapplication W/AudioCapabilities: Unsupported mime audio/mpeg-L2
2020-01-04 19:57:18.336 17363-17656/com.example.myapplication W/AudioCapabilities: Unsupported mime audio/x-ms-wma
2020-01-04 19:57:18.407 17363-17656/com.example.myapplication W/VideoCapabilities: Unrecognized profile 4 for video/hevc
2020-01-04 19:57:18.420 17363-17656/com.example.myapplication W/VideoCapabilities: Unsupported mime video/mp43
2020-01-04 19:57:18.439 17363-17656/com.example.myapplication W/VideoCapabilities: Unrecognized profile/level 1/32 for video/mp4v-es
2020-01-04 19:57:18.439 17363-17656/com.example.myapplication W/VideoCapabilities: Unrecognized profile/level 32768/2 for video/mp4v-es
2020-01-04 19:57:18.439 17363-17656/com.example.myapplication W/VideoCapabilities: Unrecognized profile/level 32768/64 for video/mp4v-es
2020-01-04 19:57:18.444 17363-17656/com.example.myapplication W/VideoCapabilities: Unsupported mime video/wvc1
2020-01-04 19:57:18.448 17363-17656/com.example.myapplication W/VideoCapabilities: Unsupported mime video/wvc1
2020-01-04 19:57:18.481 17363-17656/com.example.myapplication W/VideoCapabilities: Unsupported mime video/x-ms-wmv7
2020-01-04 19:57:18.484 17363-17656/com.example.myapplication W/VideoCapabilities: Unsupported mime video/x-ms-wmv8
2020-01-04 19:57:18.518 17363-17656/com.example.myapplication I/VideoCapabilities: Unsupported profile 4 for video/mp4v-es
2020-01-04 19:57:18.525 17363-17656/com.example.myapplication W/Utils: could not parse long range '175-174'
2020-01-04 19:57:18.591 17363-17363/com.example.myapplication I/Ads: Ad failed to load : 0
2020-01-04 19:57:19.866 17363-17363/com.example.myapplication E/EnhancedIntentService: binding to the service failed
2020-01-04 19:57:22.649 17363-17462/com.example.myapplication V/FA: Inactivity, disconnecting from the service

build.gradle (Project:My Application)

buildscript {
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.5.3'
        classpath 'com.google.gms:google-services:4.2.0'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}
allprojects {
    repositories {
        google()
        jcenter()
    }
}

build.gradle (Module:app)

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
    compileSdkVersion 29
    buildToolsVersion "29.0.2"
    defaultConfig {
        applicationId "com.example.myapplication"
        minSdkVersion 16
        targetSdkVersion 29
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
}
dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'com.google.firebase:firebase-ads:18.3.0'
    implementation 'com.google.firebase:firebase-core:17.2.1'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
Answer 1

Судя по логу:

2020-01-04 19:57:18.122 17363-17640/com.example.myapplication W/cr_media: Requires BLUETOOTH permission

Требуется разрешение блютуз

2020-01-04 19:57:18.275 17363-17656/com.example.myapplication W/AudioCapabilities: Unsupported mime audio/ac4
2020-01-04 19:57:18.279 17363-17656/com.example.myapplication W/AudioCapabilities: Unsupported mime audio/x-ima
2020-01-04 19:57:18.295 17363-17656/com.example.myapplication W/AudioCapabilities:     Unsupported mime audio/eac3-joc
2020-01-04 19:57:18.313 17363-17656/com.example.myapplication W/AudioCapabilities: Unsupported mime audio/mpeg-L1
2020-01-04 19:57:18.315 17363-17656/com.example.myapplication W/AudioCapabilities: Unsupported mime audio/mpeg-L2
2020-01-04 19:57:18.336 17363-17656/com.example.myapplication W/AudioCapabilities: Unsupported mime audio/x-ms-wma
2020-01-04 19:57:18.407 17363-17656/com.example.myapplication W/VideoCapabilities: Unrecognized profile 4 for video/hevc
2020-01-04 19:57:18.420 17363-17656/com.example.myapplication W/VideoCapabilities: Unsupported mime video/mp43
2020-01-04 19:57:18.439 17363-17656/com.example.myapplication W/VideoCapabilities: Unrecognized profile/level 1/32 for video/mp4v-es
2020-01-04 19:57:18.439 17363-17656/com.example.myapplication W/VideoCapabilities: Unrecognized profile/level 32768/2 for video/mp4v-es
2020-01-04 19:57:18.439 17363-17656/com.example.myapplication W/VideoCapabilities: Unrecognized profile/level 32768/64 for video/mp4v-es
2020-01-04 19:57:18.444 17363-17656/com.example.myapplication W/VideoCapabilities: Unsupported mime video/wvc1
2020-01-04 19:57:18.448 17363-17656/com.example.myapplication W/VideoCapabilities: Unsupported mime video/wvc1
2020-01-04 19:57:18.481 17363-17656/com.example.myapplication W/VideoCapabilities: Unsupported mime video/x-ms-wmv7
2020-01-04 19:57:18.484 17363-17656/com.example.myapplication W/VideoCapabilities: Unsupported mime video/x-ms-wmv8
2020-01-04 19:57:18.518 17363-17656/com.example.myapplication I/VideoCapabilities: Unsupported profile 4 for video/mp4v-es

Не может подгрузить кодеки и поэтому

2020-01-04 19:57:18.525 17363-17656/com.example.myapplication W/Utils: could not parse long range '175-174'
2020-01-04 19:57:18.591 17363-17363/com.example.myapplication I/Ads: Ad failed to load : 0
2020-01-04 19:57:19.866 17363-17363/com.example.myapplication E/EnhancedIntentService: binding to the service failed
2020-01-04 19:57:22.649 17363-17462/com.example.myapplication V/FA: Inactivity, disconnecting from the service

Попоробуйте посмотреть есть-ли настройки кэша(если есть попробуйте задать размер принудительно) или настройки содержимого и типов медиа у admob

READ ALSO
Ошибка NullPointerException в JavaFx

Ошибка NullPointerException в JavaFx

делаю чат на java, но столкнулся с ошибкой и не понимаю, как ее решитьОшибка:

96
IndexOutOfBoundsException

IndexOutOfBoundsException

Ошибка:

89
Как закрепить flex элемент справа сверху?

Как закрепить flex элемент справа сверху?

В флекс каталоге есть меню и товары, как закрепить меню в правом верхнем углу так, чтобы товары обтекали его слева и снизу? https://jsfiddlenet/4roj2ced/

164
Как изменить прозрачность элемента при прокрутке страницы?

Как изменить прозрачность элемента при прокрутке страницы?

Есть текст на странице, у него opacity стоит 0, и как только пользователь его увидит (к примеру прокрутит страницу) то у него должна стать opacity 1 с неким...

100