bol*_*lvo 8 android admob forceclose
我正在我的完美工作的Android应用程序中集成admob.我设法让我的Jelly Bean(4.1.2)手机正常工作,但应用程序在我的蜂窝平板电脑(3.2)上崩溃并显示消息
java.lang.NoClassDefFoundError:android.net.http.HttpResponseCache
不确定是否相关但在我的清单文件中我设置了我的minSdkVersion ="9"
我似乎无法在Google上找到相关问题.谁看过这个吗?可能是什么原因?
编辑:libs文件夹中没有文件.一切都是使用gradle设置的.
我的清单文件:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="foo.bar.results"
android:versionCode="6"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="9"
android:targetSdkVersion="19" />
<application
android:icon="@drawable/bar"
android:label="@string/app_name" >
<meta-data android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<activity
android:name=".bar"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
android:theme="@android:style/Theme.Translucent" />
</application>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
</manifest>
Run Code Online (Sandbox Code Playgroud)
这似乎是 9 月 25 日开始对许多人来说的一个错误。谷歌承诺将在下周内发布更新来解决这个问题。
归根结底,这归结为 android 文档中的一个错误。Android SDK 中的 HttpResponseCache 表示它在 API 13 中可用,但似乎 API 13 实际上并不支持 HttpResponseCache,而是必须转到 API 级别 14 才能获得对其的支持。因此,有人在没有正确检查的情况下发布了 API 13 的构建更改,并依赖 Android SDK 文档的正确性。
目前,最好的做法是执行以下操作:
try {
adView.loadAd(builder.build());
} catch (NoClassDefFoundError ex) {}
Run Code Online (Sandbox Code Playgroud)