6
error: Error: String types not allowed (at 'configChanges' with value
    'keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize').

Here is all my relevant code.

In the manifest:

    android:minSdkVersion="8"
    android:targetSdkVersion="13"

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

SOLVED!!! The problem was the break in the tags on configChanges. They needed to be all on one line together. Do not split the line for readability, leave it together.

Ryan Thompson
  • 61
  • 2
  • 4
  • Have you wrapped `android:name` and `android:configChanges` in an `` tag? – Mxyk Sep 27 '12 at 17:56
  • yes i did. Sorry for not showing the full code there. – Ryan Thompson Sep 29 '12 at 05:29
  • Duplicate of http://stackoverflow.com/questions/11208729/error-string-types-not-allowed-at-androidconfigchanges-in-manifest-file and http://stackoverflow.com/questions/12015972/android-admob-integration-issue-string-types-not-allowed – arkon May 03 '13 at 06:39
  • I added the line break for readability, removing that has solved my error. Thanks :) – Aakanksha Jun 17 '16 at 05:57

2 Answers2

5

I had this problem, but I was building my app with api 8. I also had api 13 as minimum sdk version. This is how to get it working: right click on your project>properties>android>choose android 3.2 or higher. This worked for me

Simon
  • 2,328
  • 6
  • 26
  • 30
2

Even if your target is 13, I guess this will not work on devices with api less than 13 because the changed value is not just a TAG in the manifest, but it is a VALUE of a TAG. Therefore, the system will parse these values regardless of its api and will throw an exception when it finds an unknown VALUE.

To solve this, you will have to build the project twice: for api < 13 and for api >=13.

Correct me if I am mistaken (:

Sherif elKhatib
  • 45,786
  • 16
  • 89
  • 106