Manifest output directory error


I had to integrate a library into my app and the library had its gradle version as 4.0.0, while my app had 3.2.2 (or something). So it bumped into the queries tag in the library (in the Manifest) that it wouldn’t recognize. Therefore I have updated the gradle version in my app to be the same as the library, at 4.0.0 (now I put it as 4.1.0, the latest).

The problem is that I bump into the following error:

`Execution failed for task ‘:app:processCanaryDebugManifest’.

Could not get unknown property ‘manifestOutputDirectory’ for task ‘:app:processCanaryDebugManifest’ of type`

I haven’t been able to make any progress on this. I have ran the gradlew command with --stacktrace but all I get are errors from gradle, nothing specific. Do you know of any way to make this work? Thanks!

I have not run into that problem, and it does not ring any bells. Some thoughts/questions:

  • Is “canary” a build type of the app or of the library?
  • How is the app using the library? implementation project(":library") or are you pulling in an artifact?
  • If you create a scrap project, copy the library in as a module there (as I am guessing that you have it in your real project), do you get the same error? IOW, is this reproducible, or is it tied too closely to the real project?

Canary is a build flavor of the app. The app is using the library as a regular dependency in my build.gradle(app) file with implementation.... I haven’t used it on a scrap project but I have currently de-activated it (commented out the lines of its declaration) and my app still blows with the same error. Now I have reverted to a lower gradle version, at 3.3.3 (from your post on stackoverflow where you mentioned the versions pertaining to that “queries” element that crashes the build process), here:

I am now trying to run without the library, but I’m getting another error:

Cause: property(interface org.gradle.api.file.Directory, transform(property(interface org.gradle.api.file.Directory, fixed(class org.gradle.api.internal.file.DefaultProjectLayout$FixedDirectory, C:\build\myapp\app))))\AndroidManifest.xml (The filename, directory name, or volume label syntax is incorrect)

Not sure why it points to “C:\build” when in fact there’s no such directory, and where this path is defined.

Yeah, at this point, this is getting into the weeds of your particular build setup. Not to mention that you’re using Windows, and I haven’t tried an Android build on Windows since the Eclipse days.

I have found something like what I have, here:

I might bump up the version of my gradle again, and see how it reacts.