在Android Studio中,如何以及为什么将assembleDebug任务从“ build”转移到“其他任务”

时间:2019-01-24 18:01:11

标签: android android-studio gradle

通常在build下的Android Studio中,我们有assembleassembleDebugassembleRelease。直到最近我的项目都采用这种方式。 assembleDebugassembleRelase突然从build中消失了,现在可以在other tasks中找到(见图片)。

enter image description here

从命令行运行gradlew会显示相同的内容,即:

Build tasks
-----------
assemble - Assemble main outputs for all the variants.
assembleAndroidTest - Assembles all the Test applications.
build - Assembles and tests this project.
buildDependents - Assembles and tests this project and all projects that depend on it.
buildNeeded - Assembles and tests this project and all projects it depends on.
bundle - Assemble bundles for all the variants.
classes - Assembles main classes.
clean - Deletes the build directory.
cleanBuildCache - Deletes the build cache directory.
compileDebugAndroidTestSources
compileDebugSources
compileDebugUnitTestSources
compileReleaseSources
compileReleaseUnitTestSources
extractDebugAnnotations - Extracts Android annotations for the debug variant into the archive file
extractReleaseAnnotations - Extracts Android annotations for the release variant into the archive file
jar - Assembles a jar archive containing the main classes.
testClasses - Assembles test classes.

我不认为我在gradle文件中做了什么异常。是否有人知道会发生什么,为什么assembleDebug不在build中显示other tasks

0 个答案:

没有答案