java - Gradle 中的 InstallDebug 在哪里?如何安装测试Android应用程序?

标签 java android gradle android-studio

我正在尝试在我的测试设备上安装我在 Android Studio 中开发的 Android 应用。我通常使用名为“InstallDebug”的 Gradle 任务执行此操作。但是,在我新创建的项目中,我现在在 Gradle 任务列表中不再看到此任务。我看到的以 Install* 开头的唯一两件事是

  • 安装DefaultFlavorDebug
  • 安装DefaultFlavorTest

有人知道我需要使用哪个 Gradle 任务在手机上安装我的应用程序来测试它吗?

最佳答案

现在您将找到此任务:

gradlew install<Flavor><Build Type>.

示例:2 种风格 f1,f2 和 2 种构建类型 调试、发布

你会发现:

installF1Debug - Installs the Debug build for flavor f1
installF1DebugTest - Installs the Test build for the f1 build
installF1Release -- Installs the Release build for flavor f1
installF2Debug - Installs the Debug build for flavor f2
installF2DebugTest - Installs the Test build for the f2 build
installF2Release -- Installs the Release build for flavor f2

关于java - Gradle 中的 InstallDebug 在哪里?如何安装测试Android应用程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21457546/

相关文章:

android - 用于移动解决方案的 VR 耳机 (iOS\Android)

java - 在主方法中创建同一类的实例是否会创建两个实例?

java - 从 SPARQL 更新查询获取受影响的三元组

java - 捕获 IndexOutOfBoundsException 异常

java - 如何避免使用 spanned fromHtml 的图像?

android - 想要在 webview android 中完成 url 加载后将 webview 重定向到其他 Intent

android - 无法合并dex-Android Studio 3.0.1

java - 多个 Dex 文件定义 Landroid/support/v4

android - 最新构建工具 : What To Use? (Android)

java - 如何以给定的 X 和 Y 坐标绘制一个圆作为圆的中间点?