I keep getting configChanges: string types are not allowed. Even with the target API set to 13

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

Here is my 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"/> 

SOLVE!!! The problem was tag breaks in configChanges. They needed to be on the same line together. Do not divide the line into readability, leave it together.

+6
source share
2 answers

I had this problem, but I am building my application with api 8. I also had api 13 as the minimum version of sdk. Here's how to do it: right click on your project> properties> android> select android 3.2 or higher. It worked for me

+5
source

Even if your goal is 13, I think this will not work on devices with api less than 13, because the changed value is not only the TAG in the manifest, but it is VALUE for the TAG , so the system will analyze these values ​​regardless of its api and will throw an exception if it finds an unknown VALUE .

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

Correct me if I am wrong (:

+2
source

Source: https://habr.com/ru/post/926434/


All Articles