一、背景
1、Unity 2021.3.9f1
2、Max由6.0.1至最新版本6.1.0
二、問題描述
- 錯誤信息
Attribute meta-data#com.google.android.play.billingclient.version@value value=(6.1.0) from [com.android.billingclient:billing:6.1.0] AndroidManifest.xml:21:13-34
is also present at [:billing-5.2.1:] AndroidManifest.xml:25:13-34 value=(5.2.1).
Suggestion: add ‘tools:replace=“android:value”’ to element at AndroidManifest.xml:19:9-21:37 to override.
* What went wrong:
Execution failed for task ‘:launcher:processReleaseMainManifest’.
Manifest merger failed with multiple errors, see logs
- Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
三、解決方案
- 原因:
Max聚合安裝了多個廣告源,不確定是哪個廣告的SDK依賴更高版本結(jié)算庫,導(dǎo)致SDK依賴和IAP依賴沖突文章來源:http://www.zghlxwxcb.cn/news/detail-802318.html
- 解決方法
(1)勾選Custom Main Gradle Template
(2)打開Assets/Plugins/Android/maintemplate.gradle,在dependencies依賴塊里,添加如下設(shè)置,告知Gradle不要包含 Unity IAP 已包含的 billingclient 庫。
dependencies {
…
// ** ADD THIS **
configurations.all {
exclude group: ‘com.android.billingclient’, module: ‘billing’}
}文章來源地址http://www.zghlxwxcb.cn/news/detail-802318.html
到了這里,關(guān)于【Unity】Attribute meta-data#com.google.android.play.billingclient.version 多版本庫沖突的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!