我正在尝试在我的测试设备上安装我在 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/