标签: android-virtual-device

Android Instrumentation测试安装APK失败

我想将仪器测试作为 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)

android android-virtual-device android-instrumentation

17
推荐指数
2
解决办法
1万
查看次数

如何在eclipse中创建一个新的AVD?

我在eclipse中创建一个新的android虚拟设备时遇到问题我有一个需要此信息的窗口:AVD名称,设备,目标,CPU/ABI,键盘,皮肤,前置摄像头,后置摄像头,内存选项,内部Storge,SD卡,仿真选项和确定按钮.

而不是我在教程中看到的只需要此信息的窗口:名称,目标,CPU/ABI,SD卡,快照,外观,硬件和创建AVD按钮.

在我的窗口中我不知道什么是设备选项我应该选择+我选择的OK按钮永远不可用!我该怎么办 ?请帮帮我,谢谢.

eclipse sdk android android-virtual-device

16
推荐指数
2
解决办法
9万
查看次数

AVD无法启动(SDK Tools 22.6.2)

我下载了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 adt adb android-virtual-device android-emulator

16
推荐指数
3
解决办法
7646
查看次数

Android模拟器只显示空白屏幕

我是Android编程的完整版本,并且通过阅读教程第一次尝试使用它.问题是我已经使用android 4.4.2 API创建了多个模拟器,并且它们都没有显示任何东西,只有空白屏幕..我尝试使用Google API 19的AVD.thats也没有工作..任何人都可以指导我找出什么是错了.谢谢

android android-virtual-device

16
推荐指数
3
解决办法
4万
查看次数

Android Emulator Does not Launch

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 android-virtual-device android-emulator

16
推荐指数
2
解决办法
3万
查看次数

是否可以在VMWare上运行Android设备模拟器(通过Android Studio 2)?

我一直在运行Android Studio 1.5.1在Windows 2012 R2的WMWare副本上进行开发,一切正常.我已经能够毫无问题地运行设备模拟器并启动在AVD中运行的各种版本的Android.

Android Studio 2.x更改 我最近安装了Android Studio 2.0(有关确切版本,请参见下图).

Android Studio版本信息

现在,当我尝试运行模拟器时,没有任何反应.好吧,实际上当我尝试启动设备时,我确实在Studio的状态栏中看到了一条消息,但随后该消息消失,之后没有任何反应.

开始...

有一个警告,我需要关闭Hyper-V(见下图),但我不相信这是可能的,因为这是一个VM.

不再可能吗?

是否无法再在VM上运行模拟器?

关闭Hyper-V

android android-virtual-device android-studio-2.0

16
推荐指数
2
解决办法
3万
查看次数

Android Studio 3.0预览版缺少'使用相同的设备以便将来启动'复选框

我遇到了Android Studio 3.0 Preview的错误.当我插入设备时,缺少小的有用复选框.

截图

有人知道如何启用它吗?

android-virtual-device android-studio android-studio-3.0

16
推荐指数
1
解决办法
1332
查看次数

紧急:找不到AVD系统路径。请定义ANDROID_SDK_ROOT(在Windows 10中)

virtual device (AVDAndroid studio()上创建的)上运行应用程序Windows 10时,出现错误和恐慌。

模拟器:PANIC:找不到AVD系统路径。请定义ANDROID_SDK_ROOT仿真器:进程完成,退出代码为1

虽然我已经ANDROID_SDK_ROOT在环境变量中定义了我。

谁能告诉我如何解决这个问题?

android android-virtual-device android-studio

16
推荐指数
6
解决办法
4万
查看次数

Android模拟器(AVD)无法在MacOS中启动

当目标平台为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)

android selinux android-virtual-device

16
推荐指数
1
解决办法
613
查看次数

AVD 显示错误等待设备时出错:索引 0 处的非法字符 <*>:*.lock

我的 Android 项目的 Pixel 2 Api 30 AVD 无法正常工作。它向我展示了这个错误: 在此输入图像描述

你能为我做点什么吗?请帮忙。

java android android-virtual-device android-studio

16
推荐指数
2
解决办法
3万
查看次数