通常在build
下的Android Studio中,我们有assemble
,assembleDebug
和assembleRelease
。直到最近我的项目都采用这种方式。 assembleDebug
和assembleRelase
突然从build
中消失了,现在可以在other tasks
中找到(见图片)。
从命令行运行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
?