我正在尝试在我的项目中构建 appbundle。我按照官方指南中的步骤进行操作,但在 gradle 同步时出现以下错误。有什么问题?
* What went wrong:
A problem occurred evaluating project ':MyProject'.
> Could not find method bundle() for arguments [build_4ng76ykxfhsfa1nuepa3fikmu$_run_closure5$_closure28@6448fs70] on object of type com.android.build.gradle.AppExtension.
我添加android.enableAapt2=true
到 gradle.properties 文件并运行 ./gradlew --stop