在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):quittle/gradle-android-emulator开源软件地址(OpenSource Url):https://github.com/quittle/gradle-android-emulator开源编程语言(OpenSource Language):Java 94.5%开源软件介绍(OpenSource Introduction):Android Emulator PluginThis plugin adds tasks that install an Android emulator and start it up when running instrumentation tests installs the Android Emulator and starts it up when running the instrumentation tests. Includes configuration for specifying the emulator configuration. This plugin will automatically accept all Android SDK licenses when installing the emulator and emulator system images. Before using the plugin or upgrading Android SDK versions, make sure you are okay accepting the licenses for those versions. ConsumptionThe minimum requirement for consumption is to simply apply this plugin. build.gradle// Consume from Gradle plugin repository. This is the only required step.
plugins {
id 'com.quittle.android-emulator' version 'X.X.X'
}
// Consume android plugin as usual.
apply plugin: 'android'
android {
// Fill out normally
}
// Optional configuration
androidEmulator {
emulator {
name 'my_avd_emulator_name' // Defaults to be dynamically based on the configuration of the AVD
device 'pixel_xl' // Defaults to exclude the device flag, using avdmanager default. For options, run avdmanager list device
sdkVersion 28 // Defaults to (Target SDK), then (Min SDK), then finally 10
abi 'x86_64' // Defaults to x86
includeGoogleApis true // Defaults to false
}
enableForAndroidTests false // Defaults to true
avdRoot '~/.android/avd' // Defaults to be <gradle-build-dir>/android-avd-root
headless true // Defaults to false but should be set to true for most CI systems
additionalSdkManagerArguments '--proxy=http', '--proxy_host=56.78.90.12', '--proxy_port=1234' // Additional arguments to pass to the sdkmanager when used to install dependencies. See https://developer.android.com/studio/command-line/sdkmanager#options for options
additionalEmulatorArguments '-no-snapshot', '-http-proxy=localhost:1234' // Additional arguments to pass to the emulator at startup. See https://developer.android.com/studio/run/emulator-commandline#startup-options for options
logEmulatorOutput true // Defaults to false but can be enabled to have emulator output logged for debugging.
} Tips & TricksEmulator failing to startIf the emulator fails start with an error like
and you are unsure what the cause is, set Custom test taskIf you have reason to run a custom instrumentation test task rather than the default one generated by the Android Gradle plugin, you can certainly do so. All you must do to ensure the emulator is spun up and down at the appropriate times is to
DevelopmentIn general, perform builds in the context of each folder, rather than as a multi-project Gradle
build. This is necessary because the In general, to build and test locally.
DeploymentThis package is deployed via CircleCI.
See In the configuration for the project on CircleCI, Upon check-in to the |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论