gpt4 book ai didi

android - 如何在 gradle 任务中构建 -debug-androidTest-unaligned.apk

转载 作者:行者123 更新时间:2023-11-30 01:19:20 25 4
gpt4 key购买 nike

在 android studio 中,当我运行 espresso 测试时,控制台输出:

Installing APK: /home/roroco/Dropbox/jvs/ro-adr/testStartApp/build/outputs/apk/testStartApp-debug-androidTest-unaligned.apk
Uploading file to: /data/local/tmp/ro.testStartApp.test
Installing ro.testStartApp.test
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/ro.testStartApp.test"
pkg: /data/local/tmp/ro.testStartApp.test
Success

但是当我 rm build/并运行 gradle assembleDebug 时,“testStartApp-debug-androidTest-unaligned.apk”不存在,如下所示:

roroco@roroco ~/Dropbox/jvs/ro-adr/testStartApp $ lsa /home/roroco/Dropbox/jvs/ro-adr/testStartApp/build/outputs/apk
total 9496
drwxr-xr-x 2 roroco roroco 4096 May 21 23:08 .
drwxr-xr-x 6 roroco roroco 4096 May 21 23:40 ..
-rw-r--r-- 1 roroco roroco 3237948 May 21 23:08 testStartApp-debug.apk
-rw-r--r-- 1 roroco roroco 3237559 May 21 23:08 testStartApp-debug-unaligned.apk
-rw-r--r-- 1 roroco roroco 3211410 May 21 23:08 testStartApp-release-unsigned.apk

哪个gradle任务可以生成“testStartApp-debug-androidTest-unaligned.apk”?

最佳答案

当我列出任务时:

roroco@roroco ~/Dropbox/jvs/ro-adr/testStartApp $ gd tasks|gr assemble
assemble - Assembles all variants of all applications and secondary packages.
assembleAndroidTest - Assembles all the Test applications.
assembleDebug - Assembles all Debug builds.
assembleRelease - Assembles all Release builds.
build - Assembles and tests this project.
buildDependents - Assembles and tests this project and all projects that depend on it.
buildNeeded - Assembles and tests this project and all projects it depends on.
Pattern: build<ConfigurationName>: Assembles the artifacts of a configuration.
Pattern: upload<ConfigurationName>: Assembles and uploads the artifacts belonging to a configuration.

它是 assembleAndroidTest

关于android - 如何在 gradle 任务中构建 -debug-androidTest-unaligned.apk,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37364988/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com