Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not get unknown property 'manifestOutputDirectory'

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

Execution failed for task ':myApp:processGoogleDebugManifest'.

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

Any help please?

EDIT: 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.

like image 414
Sergio Viudes Avatar asked Oct 16 '20 12:10

Sergio Viudes


3 Answers

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.

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.

like image 139
row Avatar answered Nov 16 '22 09:11

row


This solved my same problem:

In the project level build.gradle, replace this:

classpath 'com.huawei.agconnect:agcp:1.3.1.300'

with this:

classpath 'com.huawei.agconnect:agcp:1.4.1.300'

Reference: https://github.com/Tencent/tinker/issues/1471#issuecomment-710777366

like image 43
mehrdad seyrafi Avatar answered Nov 16 '22 09:11

mehrdad seyrafi


If you're using bugsnag, replace the following line

classpath 'com.bugsnag:bugsnag-android-gradle-plugin:4.+'

with:

classpath 'com.bugsnag:bugsnag-android-gradle-plugin:5.+'

For further detail, see this issue: Fails with AGP 4.1.0-alpha04 and this comment.

like image 4
glinda93 Avatar answered Nov 16 '22 08:11

glinda93