Android TRTC Demo 清单文件合并失败

2024-03-17  本文已影响0人  张科_Zack

今天运行腾讯的TRTC Demo 出现类似如下清单文件合并失败问题,各种操作都没解决,还得是Stack Overflow, gradle 插件版本改为3.5.4解决了问题

"Missing 'package' key attribute on element package at AndroidManifest.xml:11:5-64"

This issue happens for the combination of:

Using Android-SDK's API level 31 (or later),
With old Gradle version(s).
Basically, updating build-tools to 31 is not enough to support queries element (of manifest, added since Android 11+). Gradle needs to be updated, too.

It worked for me when I upgraded Gradle from 3.5.0 to 3.5.4.

In root build.gradle file, like:

// ...

dependencies {
classpath 'com.android.tools.build:gradle:3.5.4'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}

上一篇 下一篇

猜你喜欢

热点阅读