Admob will not work manifest failes

straybullet

Member
Licensed User
Longtime User
I am trying to add admob to my app, but the manifest changes break the compille everytime.

I have even copied the entire manifest provided in the example (tutorial for admob) it still fails. I have the latest Google admob sdk and admob lib 1.2 loaded, it just fails when using the suggested manifest...


Compiling code. 0.06
Using existing AndroidManifest.xml.
(Project - Do Not Overwrite Manifest option is checked)
AndroidManifest-Example.xml file will be created instead.
Generating R file. 0.00
Compiling generated Java code. 0.56
Convert byte code - optimized dex. 0.43
Packaging files. Error
AndroidManifest.xml:24: error: Error: String types not allowed (at 'configChanges' with value 'keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize').
 

pluton

Active Member
Licensed User
Longtime User
... it just fails when using the suggested manifest...


Compiling code. 0.06
Using existing AndroidManifest.xml.
(Project - Do Not Overwrite Manifest option is checked)
AndroidManifest-Example.xml file will be created instead.
Generating R file. 0.00
Compiling generated Java code. 0.56
Convert byte code - optimized dex. 0.43
Packaging files. Error
AndroidManifest.xml:24: error: Error: String types not allowed (at 'configChanges' with value 'keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize').

I can help you.
This your error happens when you are using lower Android SDK version.
As Erel wrote in tutorial:
The new AdMob library requires Android SDK level 13 or above. You will need to download it with the SDK Manager and then choose Tools - Configure Paths and choose android.jar from platforms\android-13.

You have 2 options: (I recomend to you first one)
1.) Update your Android SDK to level 13 or above
2.) Add this line in your manifest and delete this one with error:

Replace:
B4X:
<!-- *** For AdMob: manually added *** -->
        <activity android:name="com.google.ads.AdActivity"
              android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>

With this one:

B4X:
<!-- *** For AdMob: manually added *** -->
        <activity android:name="com.google.ads.AdActivity"
              android:configChanges="keyboard|keyboardHidden|orientation"/>
 

straybullet

Member
Licensed User
Longtime User
I just do not see where to install 13 from SDK manager, but android 3.2 wouldn't that keep my app from working on a lot of devices?


See attached screenshot of my sdk manager, what do I select?

Thanks
 

pluton

Active Member
Licensed User
Longtime User
I just do not see where to install 13 from SDK manager, but android 3.2 wouldn't that keep my app from working on a lot of devices?

Thanks

Everything above 3.1 is good.
3.2 is API version 13



Don't worry. Your app will work on devices with lower version also. :D

Also before upgrading try second option and see if it works. You can also use second option for AdMob. It will work
 

straybullet

Member
Licensed User
Longtime User
Pluton, many thanks. The shortened activity in the manifest did not work, but thank you for taking the time to help. I had to go to API 13.



I can help you.
This your error happens when you are using lower Android SDK version.
As Erel wrote in tutorial:


You have 2 options: (I recomend to you first one)
1.) Update your Android SDK to level 13 or above
2.) Add this line in your manifest and delete this one with error:

Replace:
B4X:
<!-- *** For AdMob: manually added *** -->
        <activity android:name="com.google.ads.AdActivity"
              android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>

With this one:

B4X:
<!-- *** For AdMob: manually added *** -->
        <activity android:name="com.google.ads.AdActivity"
              android:configChanges="keyboard|keyboardHidden|orientation"/>
 

askez

Member
Licensed User
Longtime User
i have the same problem

and i'm using ver 13 (i think, prtsc is attached)
 
Top