1
是否可以使用Maven創建Android虛擬設備?因爲現在必須在使用儀器測試運行Maven構建之前手動創建AVD。用maven創建一個默認的AVD?
我searched the web,但可以找到任何信息。 android-maven-plugin無法做到。
是否可以使用Maven創建Android虛擬設備?因爲現在必須在使用儀器測試運行Maven構建之前手動創建AVD。用maven創建一個默認的AVD?
我searched the web,但可以找到任何信息。 android-maven-plugin無法做到。
Thanks to yorkw,我找到了解決辦法。
注:
Managing AVDs from the Command Line:「如果你選擇 目標是一個標準的Android系統映像(」類型:平臺」 ),android 工具接下來會詢問您是否要創建自定義硬件 配置文件。「
的pom.xml
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<configuration>
<tasks>
<exec executable="cmd.exe">
<arg value='/c ${env.ANDROID_HOME}\tools\android create avd --name myDefaultAVD --target "Google Inc.:Google APIs:10" --force'/>
</exec>
</tasks>
</configuration>
<executions>
<execution>
<id>createDefaultAVD</id>
<phase>generate-test-resources</phase>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
簡短的回答是YES,任何編寫腳本是mavenable,檢查出[管理通過命令行自動真空澱積(http://developer.android.com/tools /devices/managing-avds-cmdline.html)。 – yorkw