二、The project is using an incompatible version (AGP 8.3.0-alpha02) of the Android Gradle plugin. Latest supported version is AGP 7.3.1 See Android Studio & AGP compatibility options.
错误一: Namespace not specified. Specify a namespace in the module's build file. See https://d.android.com/r/tools/upgrade-assistant/set-namespace for information about setting the namespace.
If you've specified the package attribute in the source AndroidManifest.xml, you can use the AGP Upgrade Assistant to migrate to the namespace value in the build file. Refer to https://d.android.com/r/tools/upgrade-assistant/agp-upgrade-assistant for general information about using the AGP Upgrade Assistant. 办理方案:需要在app—> build.gradle 设置命名空间办理
https://developer.android.com/build/configure-app-module?hl=zh-cn#groovy
在每一个模块中,都有一个build.gradle文件和AndroidManifest.xml,如今需要做的就是把AndroidManifest.xml中package="com.aaa.bbb"包名添加到模块对应的build.gradle中。每一个模块都是这样,包罗主App模块。
假设AndroidManifest.xml -> package=“com.aaa.bbb”
android {
namespace "com.aaa.bbb"
}
错误二:Cause: com/android/tools/lint/model/LintModelSeverity has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0
java 类文件版本号 61.0,对应的是java 17 办理方案:升级 jdk 版本到 java 17