无法获得未知属性“manifestOutputDirectory" [英] Could not get unknown property 'manifestOutputDirectory'

查看:37
本文介绍了无法获得未知属性“manifestOutputDirectory"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试制作项目"使用 Android Studio,我收到此错误:

I'm trying to "make project" with Android Studio, and I'm getting this error:

任务:myApp:processGoogleDebugManifest"执行失败.

Execution failed for task ':myApp:processGoogleDebugManifest'.

无法获得类型为 com.android.build.gradle.tasks.ProcessMultiApkApplicationManifest 的任务:myApp:processGoogleDebugManifest"的未知属性manifestOutputDirectory".

Could not get unknown property 'manifestOutputDirectory' for task ':myApp:processGoogleDebugManifest' of type com.android.build.gradle.tasks.ProcessMultiApkApplicationManifest.

有什么帮助吗?

在我更新到 gradle v6.5 和插件 v4.1.0 后发生此错误.如果我恢复到 gradle v6.1.1 和插件 v4.0.0,错误就会消失.

This error occurred after I updated to gradle v6.5 and plugin v4.1.0. If I revert to gradle v6.1.1 and plugin v4.0.0 the error disappears.

推荐答案

我今天遇到了同样的问题,在我的情况下是由过时的华为 AG Connect 插件版本引起的.我使用的是 com.huawei.agconnect:agcp:1.2.1.301,但是当我将其更新为 com.huawei.agconnect:agcp:1.4.1.300 时,问题已解决.

I encountered this same issue today, in my case it was caused by an outdated version of Huawei's AG Connect plugin. I was using com.huawei.agconnect:agcp:1.2.1.301, but when I updated it to com.huawei.agconnect:agcp:1.4.1.300 the issue was fixed.

但如果华为的插件不是您遇到的问题,您可以通过运行带有 --stacktrace 选项的 gradle 来调试问题,以查看问题的根源.在 Android Studio 中,您可以在 Settings/Build、Execution、Deployment/Compiler/中为 gradle 添加命令行选项命令行选项.

But if Huawei's plugin is not the problem you are having, you can debug the issue by running gradle with --stacktrace option to see where the issue originates from. In Android Studio you can add command line options for gradle in Settings/Build, Execution, Deployment/Compiler/Command-line options.

这篇关于无法获得未知属性“manifestOutputDirectory"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆