android - 通过maven安装apk

标签 android unit-testing apk pom.xml android-maven-plugin

我想知道如何将 .apk 文件添加到我的 pom.xml 中,以便按顺序从 apk 文件安装应用程序,并在第二步中使用测试构建项目、午餐模拟器、安装将要测试的 apk 等, ETC。现在,第一个 apk 是手动安装的,但我需要安装那个 apk whit maven,然后转到第二步。有没有其他人遇到同样的问题?

最佳答案

好的,我自己解决了,这是 pom.xml 的一部分

<executions>
  <execution>
   <id>startEmulator</id>
       <phase>initialize</phase>
       <goals>
         <goal>emulator-start</goal>
       </goals>
   </execution>
   <execution>
   <id>install-client</id>
       <phase>initialize</phase>
       <configuration>
          <file>my.apk</file>
       </configuration>
       <goals>
          <goal>deploy</goal>
       </goals>
   </execution>
</executions>

关于android - 通过maven安装apk,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10684840/

相关文章:

android - 如何在 react-native 中减小 Android APK 大小?

android - 验证程序未将数据保存到Firebase数据库

javascript - 如何使用纯javascript和Jest测试点击事件

c# - 在一个可靠的解决方案中集成用 Python 编写的测试和用 C# 编写的测试

android - 无法从 https 下载 .apk

java - Android:使用 ANT 编译 APK,项目文件夹外的公共(public)库

java - Android动画,一个简单的线性插值器

android - Gradle 同步中的错误 [IntelliJ Idea 13.1]

android - 从 webview 访问原生 android 方法

java - Spring Boot 应用程序中的 Mockito 模拟和 spy