bug:
> Manifest merger failed : Attribute meta-data#com.baidu.lbsapi.API_KEY@value value=(MiApkyXZS42rupA00HI2CXDF) from [com.hxct:smart-gps:1.0.0] AndroidManifest.xml:33:13-53
is also present at [:app-debug:] AndroidManifest.xml:37:13-53 value=(hQzXk2qgLE193GnFd1S5NQi7).
Suggestion: add 'tools:replace="android:value"' to <meta-data> element at AndroidManifest.xml:31:9-34:21 to override.
原因分析:
在gps模块和app-debug模块中,都使用了百度地图,都注册了meta-data,合并失败。
解决方案:
在AndroidManifest.xml中<application>节点添加
<meta-data
android:name="com.baidu.lbsapi.API_KEY"
android:value="hQzXk2qgLE193GnFd1S5NQi7"
tools:replace="android:value" />
网友评论