ZOMGbies
ZOMGbies

Reputation: 51

AdMob won't work on my app - Says I must have an AdActivity declared (I already do!!)

Whenever I test the AdMob thingy I've included in my project, rather than an advert I get: "You must have an adactivity declared in androidmanifest.xml with configChanges".

After some extensive research I keep getting the same answers - Build your app for version 3.2 or higher. Well... NO. I won't - That's a STUPID solution.

"We don't have enough food to eat tonight, should I get some more?" "Nah, you should just chop off your arms, then you wont be able to eat the food anyway."

Thats the logic I'm seeing.

Can anyone tell me how to put adverts on Apps for 1.6+? Cheers

Upvotes: 0

Views: 263

Answers (2)

Nitin Joshi
Nitin Joshi

Reputation: 128

Here may be this will help

first you should have internet user permission set in your manifest like this :

    <uses-permission android:name="android.permission.INTERNET"/>

then declare your ad activity in manifest like this :

    <activity android:name="com.google.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />

also plz update your admob sdk to latest one as current one is "V-6.3.0".

while testing your app add this line to your admob view

     ads:testDevices="TEST_EMULATOR, TEST_DEVICE_ID"

and this should work for any version...

Upvotes: 1

RajPara
RajPara

Reputation: 2281

So even if you set target=android-13 or higher in your project.properties file, you can still actually build your apps on all Android devices down to 1.5 as long as you use <uses-sdk android:minSdkVersion="3"/> in your AndroidManifest.xml.

Referenced from here.

Upvotes: 2

Related Questions