清洁之间的区别,gradlew清洁 [英] Difference between clean, gradlew clean

查看:254
本文介绍了清洁之间的区别,gradlew清洁的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从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。


会有什么区别内部过程。

解决方案


  1. ./ gradlew clean



    使用您的项目的 gradle wrapper 来执行你的项目的 clean 任务。通常,这只是删除了构建目录。


  2. ./ gradlew clean assembleDebug



    同样,使用您的项目的gradle包装来执行 clean assembleDebug 任务。因此,它会先清理,然后在任何非最新的依赖任务之后执行 assembleDebug


  3. ./ gradlew clean:assembleDebug



    基本上与#2相同。冒号代表任务路径。任务路径在 gradle多项目中至关重要,在这种情况下并非如此。这意味着运行根项目的assembleDebug任务。在这里,根项目是唯一的项目。

  4. 构建 - >清洁



    基本上与 ./ 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.

解决方案

  1. ./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.

  2. ./gradlew clean assembleDebug

    Again, uses your project's gradle wrapper to execute the clean and assembleDebug tasks, respectively. So, it will clean first, then execute assembleDebug, after any non-up-to-date dependent tasks.

  3. ./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.

  4. 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆