Android-studio 3.4.0-3.4.2 Gradle ERROR: No value has been specified for property 'manifestOutputDirectory'
Mac OS - Click Android Studio > Preferences > Experimental then you have to uncheck - Only sync the active variant.
Windows - File > settings > Experimental then you have to uncheck - Only sync the active variant.
On clean PC installation I tried every trick here and nothing worked. I noticed there was logged message that licence was not accepted. I opened SDK manager, downloaded some packages that prompted me to accept licence and it started to sync.
This happened to me when I got a new laptop and did a fresh install of Android Studio.
I solved this by installing the proper Android SDK version that my project targets. Only API 29 was installed on my new machine when doing a fresh install of Android Studio, but my project targets API 28.
Open the SDK manager and download the proper Android SDK for your app and this error should resolve itself.