you must have ad activity declared in androidmanifest.xml with configchanges

4,500 views
Skip to first unread message

hadi frohar

unread,
Feb 10, 2012, 2:41:00 AM2/10/12
to Google AdMob Ads Developers
Hi
I'm trying to add ads in my application , but i get this error:
you must have ad activity declared in androidmanifest.xml with
configchanges

i added this code in the androidmanifest.xml
<activity android:name="com.google.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|
screenLayout|uiMode|screenSize|smallestScreenSize" />

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

Android target is 15 ( 4.0.3 )

Rajkumar Parameswaran

unread,
Feb 10, 2012, 12:36:24 PM2/10/12
to google-adm...@googlegroups.com
What is your minSdkVersion set to? I believe it must be set to something 3 or above according to this

So do you have something like this:

<uses-sdk android:minSdkVersion="3" android:targetSdkVersion="15"/>

Eric Leichtenschlag

unread,
Feb 13, 2012, 5:05:33 PM2/13/12
to google-adm...@googlegroups.com
To clarify, setting the minSdkVersion=3 is not necessary; however, if you want your app to support Android 1.5 devices, you still have the ability to do so.

The setup you've described looks correct.  Setting the build target to android-15 in the project.properties should make Android 4.0.3 your referenced jar, and you should be able to receive ads with the configChanges and permissions you have above.  Are you still experiencing issues?

Eric


kunal verma

unread,
Nov 30, 2012, 12:00:45 AM11/30/12
to google-adm...@googlegroups.com
the config changes should look like this android:configChanges="keyboard|keyboardHidden|orientation|
screenLayout|uiMode|screenSize|smallestScreenSize"
Then It wont show the error.
As Eric suggested, you should recheck the project.properties file for build target to be 15. You can find the project.properties at the end of each project.
Let us know if this helps.

On Thu, Nov 29, 2012 at 12:04 AM, varun agarwal <freean...@gmail.com> wrote:
Hi,

Even I tried the same. I am also facing the same issue and not able to figure out why it is happening.

I added the code as below in Manifest File
        <activity 
            android:name="com.google.ads.AdActivity"
            android:configChanges="keyboard|keyboardHidden|orientation">
        </activity>
<uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="16" />

and in the layout i am using 

<com.google.ads.AdView android:id="@+id/ad"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content" 
      ads:adUnitId="testID"
      ads:loadAdOnCreate="true"
      ads:adSize="BANNER"/>

while running the app even I am getting the same error in the view of the app.

-Varun

--
 
 
 

Himanshu Sharma

unread,
Feb 9, 2014, 6:35:35 PM2/9/14
to google-adm...@googlegroups.com
I have tried with solutions given and my manifest has this code:

<

activity android:name="com.google.ads.AdActivity"

android:configChanges="keyboard|keyboardHidden|screenLayout|uiMode|screenSize|smallestScreenSize" />

 

but i still get the same error.

Amy Quispe (AdMob SDK Team)

unread,
Feb 11, 2014, 5:41:33 PM2/11/14
to google-adm...@googlegroups.com
Hi Himanshu,

Your configChanges is missing the orientation option. You should add that in.

Hope this helps!

Amy Quispe

Nasir Uddin Shamim

unread,
Jul 19, 2014, 3:16:44 AM7/19/14
to google-adm...@googlegroups.com
Hi Amy, thogh everything seemed correct...my admob ads is not showing up. :O

Amy Quispe (AdMob SDK Team)

unread,
Jul 21, 2014, 6:18:51 PM7/21/14
to google-adm...@googlegroups.com
Hi Nasir,

Could you give me a little more info? (logs, code?)

Amy Quispe

Nasir Uddin Shamim

unread,
Jul 22, 2014, 12:24:43 PM7/22/14
to google-adm...@googlegroups.com
Its fixed. Literally, it takes time and after a certain time I see my ads are live. 

Thanks anyway. 


--

---
You received this message because you are subscribed to a topic in the Google Groups "Google AdMob Ads Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-admob-ads-sdk/_2lI0OKEax0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-admob-ads...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Md. Nasir Uddin Shamim
+8801727451040
http://shamimnasir.com
Reply all
Reply to author
Forward
0 new messages