清洁之间的区别,gradlew清洁 [英] Difference between clean, gradlew clean
问题描述
从Android Studio项目的终端发布以下语句之间有什么区别:
$ b
Android_Studio_Project_Path:./gradlew clean
Android_Studio_Project_Path:./gradlew clean assembleDebug
Android_Studio_Project_Path:./gradlew clean:assembleDebug
和普通的Android Studio - > Build - > Clean。
会有什么区别内部过程。
-
./ gradlew clean
使用您的项目的 gradle wrapper 来执行你的项目的
clean
任务。通常,这只是删除了构建目录。 -
./ gradlew clean assembleDebug
同样,使用您的项目的gradle包装来执行
clean
和assembleDebug
任务。因此,它会先清理,然后在任何非最新的依赖任务之后执行assembleDebug
。 -
./ gradlew clean:assembleDebug
基本上与#2相同。冒号代表任务路径。任务路径在 gradle多项目中至关重要,在这种情况下并非如此。这意味着运行根项目的assembleDebug任务。在这里,根项目是唯一的项目。
- 构建 - >清洁
基本上与
./ gradlew clean
相同。请参阅此处。
有关更多信息,我建议花时间阅读Android文档,尤其是 this one 。
What is the difference between the following statements when issued from a Android Studio Project's terminal :
Android_Studio_Project_Path: ./gradlew clean
Android_Studio_Project_Path: ./gradlew clean assembleDebug
Android_Studio_Project_Path: ./gradlew clean :assembleDebug
and normal Android Studio --> Build --> Clean.
What would be the difference in the internal process.
./gradlew clean
Uses your project's gradle wrapper to execute your project's
clean
task. Usually, this just means the deletion of the build directory../gradlew clean assembleDebug
Again, uses your project's gradle wrapper to execute the
clean
andassembleDebug
tasks, respectively. So, it will clean first, then executeassembleDebug
, after any non-up-to-date dependent tasks../gradlew clean :assembleDebug
Is essentially the same as #2. The colon represents the task path. Task paths are essential in gradle multi-project's, not so much in this context. It means run the root project's assembleDebug task. Here, the root project is the only project.
Android Studio --> Build --> Clean
Is essentially the same as
./gradlew clean
. See here.
For more info, I suggest taking the time to read through the Android docs, especially this one.
这篇关于清洁之间的区别,gradlew清洁的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!