我几个星期来一直在努力解决这一问题。 StackOverflow也有一些类似的问题,AdWhirl文件网站(one 和),但这一错误仍然有待改进。
AdWhirl文件相当不完整,混淆不清。 下面的步骤:
- I created an AdMob account and I got the AdMob ID。
- I created an AdWhirl account, I put there the AdMob ID and I got the AdWhirl ID。
- I added in my Java Build Path the AdMob SDK Jar 4。3。1 and the AdWhirl SDK Jar 3。1。1
- In my Manifest file I added the following lines:
。
<manifest>
[。。。]
<application>
[。。。]
<activity android:name="com。google。ads。AdActivity"
android:configChanges="orientation|keyboard|keyboardHidden|screenLayout|uiMode|screenSize|smallestScreenSize" />
<meta-data android:value="[AdWhirl ID]" android:name="ADWHIRL_KEY"/>
</application>
<uses-permission android:name="android。permission。INTERNET"></uses-permission>
<uses-permission android:name="android。permission。ACCESS_FINE_LOCATION" />
<uses-permission android:name="android。permission。ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android。permission。READ_PHONE_STATE" />
</manifest>
- In all the layouts I want ads I added the following lines:
。
<com。adwhirl。AdWhirlLayout
android:id="@+id/adwhirl_layout"
android:layout_width="fill_parent"
android:layout_height="72dip" />
- In all the activities related to those layouts I added the following lines:
。
public class XXX extends ListActivity implements AdWhirlInterface {
[。。。]
@Override
public void onCreate(Bundle savedInstanceState) {
super。onCreate(savedInstanceState);
setContentView(R。layout。YYY);
initAds();
[。。。]
}
[。。。]
private void initAds() {
AdWhirlManager。setConfigExpireTimeout(1000 * 60 * 5);
AdWhirlTargeting。setTestMode(false);
AdWhirlLayout adWhirlLayout = (AdWhirlLayout)findViewById(R。id。adwhirl_layout);
adWhirlLayout。setAdWhirlInterface(this);
}
public void adWhirlGeneric() {
Log。e(AdWhirlUtil。ADWHIRL, "In adWhirlGeneric()");
}
}
Project Build Target: Google API Android 4。0 Emulator: Google APIs 2。1 (API 7)
我做了什么错误?
I see no ads and all the time I get the "nextRation is null!" error。