0

I'm using google-play-services library in my app which is a eclipse project. When final apk creating, it's containing some extra entries in manifest.xml file which is showing as containing ads alert when publishing app. Extra entries showing like -

<activity android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
    android:name="com.google.android.gms.ads.AdActivity"
    android:theme="@android:style/Theme.Translucent" />

How could we ignore/remove these entries from final apk?

<activity android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
    android:name="com.google.android.gms.ads.AdActivity"
    android:theme="@android:style/Theme.Translucent"
    tools:node="remove" />

I think tools:node="remove"can be used for gradle build or will work for eclipse build as well?

Pankaj
  • 833
  • 12
  • 35

1 Answers1

0

It is added by admob library. So if you don't want it and you don't want your app to contain ads, you should exclude admob from your project.

tools:node="remove" is for removing unwanted permission from other libraries that is used in your project and yes, it won't work in eclipse.

UPDATE:

Seems that you are using an old version of google-play-services which contains all modules as a single .jar file. I suggest that you find out which module of google-play-service you need for this project and only add that one with it's dependencies instead of adding all modules of google-play-services as a single jar. And this version you are using possibly is version 8.4.0 of google-play-service (or even older than it) so it is much better to use one of the newer versions.

For using only the module that your project needs and using a latest version of it, you should do as follows. Let's assume that you just need 'play-services-maps`. So you go to

<android-sdk-folder>/extras/google/m2repository/com/google/android/gms/play-services-maps  

and open one of the recent versions like 11.0.4 (or less but I suggest to choose one of 10+ versions) and get the .aar file and add it to your eclipse project (if you don't know how to use .aar file in eclipse read this). Also open the play-services-maps-x.x.x.pom file to see what is the other library that maps needs (which are play-services-base and play-services-basement in this example) and go to their folder and add their .aar files to your project too and check their .pom files as well to include tehir dependencies.

Yes, it is kind of tedious job, but it is the way to add this gradle-based-distributed libraries to eclipse.

Akram
  • 2,158
  • 1
  • 17
  • 24
  • Hi Merka, I don't have `admob` library added in my project. only library used in app is `google-play-services_lib`. – Pankaj Feb 27 '18 at 06:13
  • @Pankaj I edited my answer based on your comment. It will be better if you add this comment as additional hint to your question. – Akram Feb 27 '18 at 06:56