This versionName value (0.2) is not used; it is always overridden by the value specified in the Grad

This versionName value (0.2) is not used; it is always overridden by the value specified in the Gradle build script (0.0) less... (Ctrl+F1) 
The value of (for example) minSdkVersion is only used if it is not specified in the build.gradle build scripts. When specified in the Gradle build scripts, the manifest value is ignored and can be misleading, so should be removed to avoid ambiguity.

这个错误翻译成中文就是:

不使用此versionName值(0.2); 它始终被Gradle构建脚本(0.0)中指定的值覆盖...(Ctrl + F1)
(例如)minSdkVersion的值仅在build.gradle构建脚本中未指定时使用。 在Gradle构建脚本中指定时,清单值将被忽略并且可能会产生误导,因此应将其删除以避免歧义。

原因:你们在AndroidManifest和build.gradle都写了versioncode,versionname。系统在编译的过程中只会取build.gradle里面的数据,解决方法就是把manifest以下的内容删除。

每次修改versioncode,versionname在build.gradle就可以了

猜你喜欢

转载自blog.csdn.net/xxdw1992/article/details/82661961