Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I keep getting configChanges: String types not allowed error. Even with target API set to 13 [duplicate]

Tags:

android

admob

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.

like image 889
Ryan Thompson Avatar asked Sep 27 '12 17:09

Ryan Thompson


2 Answers

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

like image 51
Simon Avatar answered Oct 22 '22 07:10

Simon


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 (:

like image 27
Sherif elKhatib Avatar answered Oct 22 '22 07:10

Sherif elKhatib