Gradle中的InstallDebug在哪里?如何安装测试版Android App? [英] Where is InstallDebug in Gradle? How to install a test Android App?

查看:681
本文介绍了Gradle中的InstallDebug在哪里?如何安装测试版Android App?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在测试设备上安装要在Android Studio中开发的Android应用.我通常使用名为"InstallDebug"的Gradle任务执行此操作.但是,在新创建的项目中,我现在不再在Gradle任务列表中看到此任务.从Install *开始,我看到的仅有两件事是

I'm trying to install an Android app I'm developing in Android Studio on my test device. I normally do this with the Gradle task called "InstallDebug. In my newly created project however, I now don't see this task in my list of Gradle Tasks anymore. The only two things I see starting with Install* are

  • installDefaultFlavorDebug
  • installDefaultFlavorTest

有人知道我需要使用哪个Gradle Task在手机上安装我的应用程序才能对其进行测试吗?

Does anybody know which Gradle Task I need to use to install my app on my phone to test it?

推荐答案

现在您将找到以下任务:

Now you will find this tasks:

gradlew install<Flavor><Build Type>.

示例:2种口味f1,f2和2种构建类型debug, release.

Example: 2 flavors f1,f2, and 2 build types debug, release.

您会发现:

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

这篇关于Gradle中的InstallDebug在哪里?如何安装测试版Android App?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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