我正在尝试在我的应用中使用inmobi广告,但却出现了一些错误
我的代码是
XML中的
<com.inmobi.monetization.IMBanner
android:id="@+id/banner"
android:layout_width="320dp"
android:layout_height="50dp"
adSize="15"
appId="abcd" />
活动
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
InMobi.initialize(this, "abcd");
IMBanner banner = (IMBanner) findViewById(R.id.banner);
banner.loadBanner();
}
错误
06-03 12:55:07.335: D/dalvikvm(15364): Late-enabling CheckJNI
06-03 12:55:07.515: I/dalvikvm(15364): Could not find method com.google.android.gms.common.GooglePlayServicesUtil.isGooglePlayServicesAvailable, referenced from method com.inmobi.commons.internal.ActivityRecognitionManager.a
06-03 12:55:07.525: W/dalvikvm(15364): VFY: unable to resolve static method 5386: Lcom/google/android/gms/common/GooglePlayServicesUtil;.isGooglePlayServicesAvailable (Landroid/content/Context;)I
06-03 12:55:07.525: D/dalvikvm(15364): VFY: replacing opcode 0x71 at 0x0046
06-03 12:55:07.625: D/webcoreglue(15364): netstack: Memory Cache feature is OFF
06-03 12:55:07.645: D/JSENGINE(15364): qualcomm.jsengine.version:C.2-patch35-git:7b7ad6f
06-03 12:55:07.705: D/HostStatisticManager(15364): netstack: DNS Host Prioritization is: ON, Version: 5.0.1
06-03 12:55:07.705: I/(15364): netstack: LIB_MGR - Lib loaded: libdnshostprio.so
06-03 12:55:07.705: I/(15364): netstack: STAT_HUB - Succeeded to load plugin: libdnshostprio.so
06-03 12:55:07.705: E/(15364): netstack: LIB_MGR - Error loading lib spl_proc_plugin.so
06-03 12:55:07.705: E/(15364): netstack: STAT_HUB - Failed to load plugin: spl_proc_plugin.so
06-03 12:55:07.715: I/(15364): netstack: LIB_MGR - Lib loaded: pp_proc_plugin.so
06-03 12:55:07.715: I/(15364): netstack: STAT_HUB - Succeeded to load plugin: pp_proc_plugin.so
06-03 12:55:07.715: E/(15364): netstack: STAT_HUB - App com.example.add isn't supported
06-03 12:55:07.896: D/libEGL(15364): loaded /system/lib/egl/libEGL_adreno200.so
06-03 12:55:07.896: D/libEGL(15364): loaded /system/lib/egl/libGLESv1_CM_adreno200.so
06-03 12:55:07.896: D/libEGL(15364): loaded /system/lib/egl/libGLESv2_adreno200.so
06-03 12:55:07.896: I/Adreno200-EGL(15364): <qeglDrvAPI_eglInitialize:265>: EGL 1.4 QUALCOMM build: AU_LINUX_ANDROID_JB_2.5.04.02.02.040.400_msm8960_JB_2.5_CL3744273_release_AU (CL3744273)
06-03 12:55:07.896: I/Adreno200-EGL(15364): Build Date: 06/30/13 Sun
06-03 12:55:07.896: I/Adreno200-EGL(15364): Local Branch:
06-03 12:55:07.896: I/Adreno200-EGL(15364): Remote Branch: quic/jb_2.5
06-03 12:55:07.896: I/Adreno200-EGL(15364): Local Patches: NONE
06-03 12:55:07.896: I/Adreno200-EGL(15364): Reconstruct Branch: AU_LINUX_ANDROID_JB_2.5.04.02.02.040.400 + NOTHING
06-03 12:55:07.936: D/OpenGLRenderer(15364): Enabling debug mode 0
06-03 12:55:08.076: D/TilesManager(15364): Starting TG #0, 0x5d20ed00
06-03 12:55:08.076: D/TilesManager(15364): new EGLContext from framework: 5ccade50
06-03 12:55:08.076: D/GLWebViewState(15364): Reinit shader
06-03 12:55:08.176: D/GLWebViewState(15364): Reinit transferQueue
06-03 12:55:08.186: W/PicturePileLayerContent(15364): Warning: painting PicturePile without content!
06-03 12:55:08.186: W/PicturePileLayerContent(15364): Warning: painting PicturePile without content!
06-03 12:55:09.187: W/PicturePileLayerContent(15364): Warning: painting PicturePile without content!
06-03 12:55:10.919: I/dalvikvm(15364): Total arena pages for JIT: 11
06-03 12:55:10.919: I/dalvikvm(15364): Total arena pages for JIT: 12
06-03 12:55:10.919: I/dalvikvm(15364): Total arena pages for JIT: 13
答案 0 :(得分:2)
请在您的应用中添加Google Play服务jar。这些是在不包含Google Play服务jar时出现的警告。如果您不想包含Google Play服务jar,这些警告不会影响sdk或应用的功能。但是,您首选包含相同内容。