我想将仪器测试作为 CI 管道的一部分运行,但是当我运行测试时,它们会失败,因为无法安装 APK(据我所知):
> Task :app:connectedDebugAndroidTest FAILED
Mar 18, 2022 3:00:59 PM com.google.testing.platform.RunnerImpl run
SEVERE: Test execution failed with fatal error!
com.google.testing.platform.api.plugin.PluginException: Exception thrown during onBeforeAll invocation of plugin com.google.testing.platform.plugin.android.AndroidDevicePlugin.
at com.google.testing.platform.plugin.PluginLifecycleKt.invokeOrThrow(PluginLifecycle.kt:216)
at com.google.testing.platform.plugin.PluginLifecycleKt.invokeOrThrow$default(PluginLifecycle.kt:205)
at com.google.testing.platform.plugin.PluginLifecycle$onBeforeAll$1.invoke(PluginLifecycle.kt:92)
at com.google.testing.platform.plugin.PluginLifecycle$onBeforeAll$1.invoke(PluginLifecycle.kt:88)
at com.google.testing.platform.core.telemetry.common.noop.NoopDiagnosticsScope.recordEvent(NoopDiagnosticsScope.kt:35)
at com.google.testing.platform.core.telemetry.TelemetryKt.recordEvent(Telemetry.kt:105)
at com.google.testing.platform.core.telemetry.TelemetryKt.recordEvent$default(Telemetry.kt:98)
at com.google.testing.platform.plugin.PluginLifecycle.onBeforeAll(PluginLifecycle.kt:88)
at com.google.testing.platform.executor.SingleDeviceExecutor$execute$4.invoke(SingleDeviceExecutor.kt:86)
at com.google.testing.platform.executor.SingleDeviceExecutor$execute$4.invoke(SingleDeviceExecutor.kt:86)
at com.google.testing.platform.executor.SingleDeviceExecutor.runUnlessCancelled(SingleDeviceExecutor.kt:105)
at com.google.testing.platform.executor.SingleDeviceExecutor.execute(SingleDeviceExecutor.kt:86)
at com.google.testing.platform.RunnerImpl.run(RunnerImpl.kt:108)
at com.google.testing.platform.server.strategy.NonInteractiveServerStrategy$run$4.invoke(NonInteractiveServerStrategy.kt:80)
at com.google.testing.platform.server.strategy.NonInteractiveServerStrategy$run$4.invoke(NonInteractiveServerStrategy.kt:79)
at com.google.testing.platform.core.telemetry.common.noop.NoopDiagnosticsScope.recordEvent(NoopDiagnosticsScope.kt:35)
at com.google.testing.platform.core.telemetry.TelemetryKt.recordEvent(Telemetry.kt:66)
at com.google.testing.platform.server.strategy.NonInteractiveServerStrategy.run(NonInteractiveServerStrategy.kt:79)
at com.google.testing.platform.main.MainKt$main$4.invokeSuspend(Main.kt:67)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:274)
at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
at …Run Code Online (Sandbox Code Playgroud) 我在eclipse中创建一个新的android虚拟设备时遇到问题我有一个需要此信息的窗口:AVD名称,设备,目标,CPU/ABI,键盘,皮肤,前置摄像头,后置摄像头,内存选项,内部Storge,SD卡,仿真选项和确定按钮.
而不是我在教程中看到的只需要此信息的窗口:名称,目标,CPU/ABI,SD卡,快照,外观,硬件和创建AVD按钮.
在我的窗口中我不知道什么是设备选项我应该选择+我选择的OK按钮永远不可用!我该怎么办 ?请帮帮我,谢谢.
我下载了ADT软件包(22.6.2).打开Android SDK Manager时,我看到SDK Tools的版本是22.3,升级可用于SDK Tools 22.6.2.我尝试先运行一个模拟器,这非常有效.之后我安装了SDK Tools 22.6.2以及其他API.当我再次尝试打开模拟器时,它无效.
我可以创建,编辑和删除AVD.但他们不会开始.在我击中之后launch,我得到了Starting Android Device屏幕,在酒吧填充,但没有任何反应.我尝试使用不同的目标,不同的设备,不同的RAM,但无济于事.
我试图杀死adb服务器并重新启动它.没有什么变化.当我尝试时adb devices,即使我在AVD管理器中制作它们,也没有设备显示出来.
我觉得问题与具有rev的SDK工具有关.22.6.2.因为当我使用全新安装(SDK Tools为22.3)时,一切正常.
任何人都知道一个解决方案,或者只回到SDK Tools 22.3?
编辑:这是在OS X 10.6.8上,不确定这是否值得一提.
编辑2:我很抱歉没有回复很长时间.无论如何,问题仍然没有解决.当我检查更新时,没有可用的.当我尝试安装新软件时,它告诉我已经安装了所有内容.我使用https以及http.我取消选中"在安装期间联系所有更新站点以查找所需的软件".我仍然不知道会出现什么问题.
我是Android编程的完整版本,并且通过阅读教程第一次尝试使用它.问题是我已经使用android 4.4.2 API创建了多个模拟器,并且它们都没有显示任何东西,只有空白屏幕..我尝试使用Google API 19的AVD.thats也没有工作..任何人都可以指导我找出什么是错了.谢谢
I am struggling to get the emulator launch successfully after trying for over 2 weeks. I can really use some help with the issue or tips on troubleshooting the same.
I have been able to launch the emulator successfully on my home machine using very similar config. It fails when I connect from my work PC, I believe there is a some configuration that may be stopping this, but I have no clue what that configuration is and I don't …
我一直在运行Android Studio 1.5.1在Windows 2012 R2的WMWare副本上进行开发,一切正常.我已经能够毫无问题地运行设备模拟器并启动在AVD中运行的各种版本的Android.
Android Studio 2.x更改 我最近安装了Android Studio 2.0(有关确切版本,请参见下图).
现在,当我尝试运行模拟器时,没有任何反应.好吧,实际上当我尝试启动设备时,我确实在Studio的状态栏中看到了一条消息,但随后该消息消失,之后没有任何反应.
有一个警告,我需要关闭Hyper-V(见下图),但我不相信这是可能的,因为这是一个VM.
不再可能吗?
是否无法再在VM上运行模拟器?
virtual device (AVD在Android studio()上创建的)上运行应用程序Windows 10时,出现错误和恐慌。
模拟器:PANIC:找不到AVD系统路径。请定义ANDROID_SDK_ROOT仿真器:进程完成,退出代码为1
虽然我已经ANDROID_SDK_ROOT在环境变量中定义了我。
谁能告诉我如何解决这个问题?
当目标平台为Level 26(Android 8.0.0)或更高版本时,我的android模拟器无法启动.模拟器只显示黑屏,而模拟器进程持续运行大约.100%CPU.请注意,25级和更低级别工作正常.
这是我到目前为止发现的:
我从命令行启动了模拟器,以便我可以检查logcat:
./emulator -avd Test2 -logcat '*:e'
Run Code Online (Sandbox Code Playgroud)
这是logcat的摘录:
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Initializing cgroup subsys cpuacct
[ 0.000000] Linux version 3.18.91+ (android-build@wphr1.hot.corp.google.com) (gcc version 4.9 20140827 (prerelease) (GCC) ) #1 SMP PREEMPT Tue Jan 9 20:30:51 UTC 2018
[ 0.000000] Command line: qemu=1 androidboot.hardware=ranchu clocksource=pit androidboot.console=ttyS0 android.qemud=1 console=0 console=0 android.checkjni=1 qemu.gles=1 androidboot.logcat=*:e androidboot.selinux=permissive ndns=2 ndns=2
[ 0.000000] Disabled fast string operations
...
(skipping a few hundred lines)
...
[ 1.443608] init: init first …Run Code Online (Sandbox Code Playgroud)