[英]Can I remove com.google.android.gms.version from AndroidManifest when I use gradle?
I wonder if I can remove this line safely: 我想知道我是否可以安全地删除此行:
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
from my AndroidManifest.xml when I use gradle to build my APK. 当我使用gradle构建我的APK时,从我的AndroidManifest.xml。
According to the website https://developers.google.com/android/guides/setup only when I choose "ECLIPSE WITH ADT" I have to add this line. 根据网站https://developers.google.com/android/guides/setup,只有当我选择“ECLIPSE WITH ADT”时,我必须添加此行。 For "ANDROID STUDIO" usage this is not mentioned.
对于“ANDROID STUDIO”用法,没有提及。
But in my case I use Eclipse (with ADT) as IDE but I build with gradle. 但在我的情况下,我使用Eclipse(使用ADT)作为IDE,但我使用gradle构建。 (Actually it is a libGDX project).
(实际上它是一个libGDX项目)。 So I added the play-services by using gradle:
所以我使用gradle添加了play-services:
compile "com.google.android.gms:play-services:8.1.0"
So I run the app on a test device and I tested to login with play-services and it worked fine without having the line above in my AndroidManifest.xml 所以我在测试设备上运行应用程序,我测试了使用play-services登录,并且在我的AndroidManifest.xml中没有上面的行就可以正常工作
But, maybe the login just does not need the "com.google.android.gms.version" value and another part of the play services lib needs it? 但是,也许登录只是不需要“com.google.android.gms.version”值而播放服务lib的另一部分需要它吗? But I cannot test all the possible ways to use the lib.
但我无法测试使用lib的所有可能方法。
Does anybody know for sure? 有人知道吗?
Or for those of you who use Android Studio + play services: Does your AndroidManifest.xml have the line above? 或者对于那些使用Android Studio +播放服务的人:您的AndroidManifest.xml是否具有以上行?
是的,从Google Play服务7.0开始 (在7.5中改进以消除对应用于完整play-services
依赖性的限制), <meta-data>
标记由Gradle通过清单合并自动添加到您的清单文件中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.