Android-studio 3.4.0-3.4.2 Gradle 错误:没有为属性“manifestOutputDirectory"指定值

Android-studio 3.4.0-3.4.2 Gradle 错误:没有为属性“manifestOutputDirectory

问题描述:

当升级到 android-studio 3.4.x/gradle build plugin 3.4.x/gradle 5.3 ... 想知道它是否是 android 插件的问题.

when upgrading to android-studio 3.4.x/gradle build plugin 3.4.x /gradle 5.3 ... wondering if its an issue with the android plugin.

ERROR: No value has been specified for property 'manifestOutputDirectory'.

我的 gradle 脚本没有使用与清单相关的变量,也没有改变清单.我升级之前的版本是Android-Studio: 3.3/Gradle pulgin: 3.3.2/Gradle: 5.3

My gradle script does not use manifest related variables, nor has it changed the manifest. The version before my upgrade is Android-Studio: 3.3/Gradle pulgin: 3.3.2/Gradle: 5.3

First Update(20190508):修复方法(临时)

First Update(20190508):Fix method(temporary)

找到临时修复方法,但纠正错误的方法仍然未知.避免方法:我是 Mac OS X 系统:点击 Android Studio->Preperences...->Experimental取消选中:仅同步活动变体.

Find a temporary fix method, but the method of correcting the error is still unknown. Ways to avoid: I am a Mac OS X system: Click Android Studio->Preperences...->Experimental uncheck: Only sync the active variant.

我已经研究了文档.此功能可以提高编译速度.如果找到修复方法,我还想继续勾选仅同步活动变体".

I have studied the documentation. This feature can improve the compilation speed. If I find the fix method, I still want to continue to check "Only sync the active variant".

第二次更新(20190518):

Second Update(20190518):

查看了一些文档没有找到解决方案.

Looking through some documents did not find a solution.

但可能会找到一些反复出现的情况供您参考.

But probably find some recurring conditions for your reference.

这个问题的过程就是主动启动Gradle的项目同步操作.比如图中的两个地方点击就会出现.如果出现问题,您需要取消选中仅同步活动变体".

The process of this problem is to take the initiative to start Gradle's project synchronization operation. For example, two places in the figure will occur when clicked. If there is a problem, you need to uncheck "Only sync the active variant."

但是,编译安装成功后,勾选Only sync the active variant.",就不会再出现这个问题了,即使你改了build.gradle文件,需要再次同步的顶部通知,不要点击立即同步",直接使用run 'app'或者debug 'app',Android-studio会自动进行同步然后编译运行,不会再出现这个问题了.

However, after successfully compiling and installing, check "Only sync the active variant.", this problem will not appear again, even if you change the build.gradle file, the top notification that needs to be synchronized again, do not click "Sync now", directly use run 'app' or debug 'app', Android-studio will automatically perform the synchronization and then compile and run, and this problem will not occur again.

一开始我以为改变build.gradle的代码可以解决这个问题.现在感觉Android-studio或者gradle-plugin在执行项目同步的时候有些问题.希望后续版本能解决这个问题.

At first I thought that changing the code of build.gradle can correct this problem. Now I feel like Android-studio or gradle-plugin has some problems in executing project sync. I hope that the subsequent version will solve this problem.

第三次更新(20190821):

Third Update(20190821):

Android-studio 3.5.0/gradle 构建插件 3.5.0/gradle 5.4.1

Android-studio 3.5.0/ gradle build plugin 3.5.0/ gradle 5.4.1

当前最新的稳定版本修复了这个问题.

Current latest stable version fixed this issue.

启用仅同步活动变体"即可.

Enable "Only sync the active variant" is ok.

Mac OS - 单击 Android Studio >首选项 >实验性然后您必须取消选中 - 仅同步活动变体.

Mac OS - Click Android Studio > Preferences > Experimental then you have to uncheck - Only sync the active variant.

Windows - 文件 >设置 >实验性然后您必须取消选中 - 仅同步活动变体.

Windows - File > settings > Experimental then you have to uncheck - Only sync the active variant.