实现admob时出错

时间:2018-02-20 16:40:28

标签: android admob google-admob

我在app中实现了admob。当活动加载时,logcat会显示一些我无法与admob相关的错误。

logcat的:

W/ResourcesManager: Asset path '/system/framework/com.android.media.remotedisplay.jar' does not exist or contains no resources.
W/ResourcesManager: Asset path '/system/framework/com.android.location.provider.jar' does not exist or contains no resources.
I/art: DexFile_isDexOptNeeded failed to open oat file '/data/dalvik-cache/arm64/data@data@com.google.android.gms@app_chimera@m@00000040@DynamiteModulesA_GmsCore_prodlmp_xhdpi_release.apk@classes.dex' for file location '/data/data/com.google.android.gms/app_chimera/m/00000040/DynamiteModulesA_GmsCore_prodlmp_xhdpi_release.apk': Failed to open oat filename for reading: No such file or directory
D/DynamitePackage: Instantiated singleton DynamitePackage.
D/DynamitePackage: Instantiating com.google.android.gms.ads.ChimeraMobileAdsSettingManagerCreatorImpl
D/WebViewFactory: primaryArchIs64bit = true
I/WebViewFactory: Loading com.google.android.webview version 64.0.3282.137 (code 328213750)
I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.TokenBindingManagerAdapter>
I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.TokenBindingManagerAdapter>
I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.ServiceWorkerControllerAdapter>
I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.ServiceWorkerControllerAdapter>
I/cr_LibraryLoader: Time to load native libraries: 2 ms (timestamps 8604-8606)
I/chromium: [INFO:library_loader_hooks.cc(36)] Chromium logging enabled: level = 0, default verbosity = 0
I/cr_LibraryLoader: Expected native library version number "64.0.3282.137", actual native library version number "64.0.3282.137"
I/cr_BrowserStartup: Initializing chromium process, singleProcess=true
I/cr_base: Android Locale: en_IN requires .pak files: []
E/chromium: [ERROR:instance.cc(49)] Unable to locate service manifest for metrics
E/chromium: [ERROR:service_manager.cc(890)] Failed to resolve service name: metrics
I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.WebViewContentsClientAdapter$WebResourceErrorImpl>
I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.WebViewContentsClientAdapter$WebResourceErrorImpl>
I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.WebViewContentsClientAdapter$7>
I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.WebViewContentsClientAdapter$7>
I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.WebViewContentsClientAdapter$3>
I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.WebViewContentsClientAdapter$3>
D/ConnectivityManager.CallbackHandler: CM callback handler got msg 524290
I/art: Rejecting re-init on previously-failed class java.lang.Class<org.chromium.content.browser.FloatingActionModeCallback>
I/art: Rejecting re-init on previously-failed class java.lang.Class<org.chromium.content.browser.FloatingActionModeCallback>


**W/cr_media: Requires BLUETOOTH permission
E/libEGL: validate_display:255 error 3008 (EGL_BAD_DISPLAY)
D/ConnectivityManager.CallbackHandler: CM callback handler got msg 524290
W/AudioCapabilities: Unsupported mime audio/evrc
W/AudioCapabilities: Unsupported mime audio/qcelp
W/VideoCapabilities: Unrecognized profile 2130706433 for video/avc
W/AudioCapabilities: Unsupported mime audio/qcelp
W/AudioCapabilities: Unsupported mime audio/evrc
W/VideoCapabilities: Unsupported mime video/mp4v-esdp
D/DynamitePackage: Instantiating com.google.android.gms.ads.ChimeraAdManagerCreatorImpl
I/VideoCapabilities: Unsupported profile 4 for video/mp4v-es**


I/Ads: Updating ad debug logging enablement.
I/Ads: Starting ad request.
I/Ads: Use AdRequest.Builder.addTestDevice("*********") to get test ads on this device.
W/Ads: Not retrying to fetch app settings
I/Choreographer: Skipped 184 frames!  The application may be doing too much work on its main thread.
W/Ads: Invoke Firebase method getInstance error.
W/Ads: The Google Mobile Ads SDK will not integrate with Firebase. Admob/Firebase integration requires the latest Firebase SDK jar, but Firebase SDK is either missing or out of date
D/ConnectivityManager.CallbackHandler: CM callback handler got msg 524290
W/Ads: Update ad debug logging enablement as false
I/chromium: [INFO:CONSOLE(0)] "Document was loaded from Application Cache with manifest https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40-loader.appcache", source: https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40-loader.html (0)
I/chromium: [INFO:CONSOLE(0)] "Application Cache Checking event", source: https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40-loader.html (0)
I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy@3020318e time:246760805
W/cr_CrashFileManager: /data/data/com.sns.kids.maths.games/cache/WebView/Crash Reports does not exist or is not a directory
I/chromium: [INFO:CONSOLE(0)] "Application Cache NoUpdate event", source: https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40-loader.html (0)
I/Ads: Scheduling ad refresh 70000 milliseconds from now.
I/Ads: Ad finished loading.
I/chromium: [INFO:CONSOLE(0)] "Document was loaded from Application Cache with manifest https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40-loader.appcache", source: https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40-loader.html (0)
I/chromium: [INFO:CONSOLE(0)] "Application Cache Checking event", source: https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40-loader.html (0)
I/chromium: [INFO:CONSOLE(0)] "Application Cache Checking event", source: https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40-loader.html (0)
I/chromium: [INFO:CONSOLE(0)] "Application Cache NoUpdate event", source: https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40-loader.html (0)
I/chromium: [INFO:CONSOLE(0)] "Application Cache NoUpdate event", source: https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40-loader.html (0)
I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy@16ae39cd time:246768461

logcat说它需要蓝牙权限。我只是在添加admob代码时才会这样。当我删除它时,它会消失。

Admob代码:

private void showBannerAds() {
    MobileAds.initialize(this,getResources().getString(R.string.admob_appid));
    AdRequest adRequest = new AdRequest.Builder().build();
    mAdView.loadAd(adRequest);
}

0 个答案:

没有答案