无法在某些Genymotion设备上运行.apk文件

6
我使用Genymotion模拟三星Galaxy S7 (API 23),然后安装arm-translation,并在重启设备后通过拖放方式安装我的应用程序。 但是我遇到了以下错误:
Unfortunately, <application name> has stopped. 

这里是终端日志:

Failed to connect to VM (TcpStream) for main host connection, IP:Port=192.168.56.101:25000!!!
OpenGPL connected to 192.168.56.101:25000
port 22468 will be used for OpenGL data connections

这是我运行设备和应用程序时的日志文件:

Mar 12 13:14:24 [Genymotion Player] [debug] Proxy configuration: no proxy used
Mar 12 13:14:24 [Genymotion Player] [debug] Host date and time: "12 Mar 2017 13:14:24 -0400"
Mar 12 13:14:24 [Genymotion Player] [debug] Proxy configuration: no proxy used
Mar 12 13:14:24 [Genymotion Player] [debug] GET  QUrl( "https://cloud.genymotion.com/content/video" ) 
Mar 12 13:14:24 [Genymotion Player] [debug] "Local socket created at path : /tmp/0054dd293a15aa9e4d99002d5631b4ca"
Mar 12 13:14:24 [Genymotion Player] [warning] ****  STARTING VIRTUAL DEVICE  ****
Mar 12 13:14:24 [Genymotion Player] [warning] Player version: "2.8.1"
Mar 12 13:14:24 [Genymotion Player] [debug] [VBox] Loading "vboxmanage" plugin
Mar 12 13:14:24 [Genymotion Player] [debug] [VBox] Plugin "vboxmanage" loaded
Mar 12 13:14:24 [Genymotion Player] [debug] [VBox] Chipset: "GenuineIntel"
Mar 12 13:14:24 [Genymotion Player] [debug] [VBox] CPUID 0x1 (Intel): ECX= "c00e3bd"
Mar 12 13:14:24 [Genymotion Player] [debug] [VBox] Path: "VBoxManage"
Mar 12 13:14:24 [Genymotion Player] [debug] [VBox] Call: ("list", "hostinfo")
Mar 12 13:14:24 [Genymotion Player] [debug] [VBox] Return code: 0
Mar 12 13:14:24 [Genymotion Player] [debug] [VBox] [System properties] Online physical CPU number: 2
Mar 12 13:14:24 [Genymotion Player] [debug] [VBox] [System properties] Online virtual CPU number: 2
Mar 12 13:14:24 [Genymotion Player] [debug] [VBox] [System properties] Max CPU number: 4
Mar 12 13:14:24 [Genymotion Player] [debug] [VBox] [System properties] Max memory size: 3953
Mar 12 13:14:24 [Genymotion Player] [debug] [VBox] get "vboxnet0" from host.only.interface
Mar 12 13:14:24 [Genymotion Player] [debug] [VBox] [findHostOnlyInterface] Looking for compatible host-only interface
Mar 12 13:14:24 [Genymotion Player] [debug] [VBox] Call: ("list", "hostonlyifs")
Mar 12 13:14:24 [Genymotion Player] [debug] [VBox] Return code: 0
Mar 12 13:14:24 [Genymotion Player] [warning] [VBox] [getSavedHostOnlyInterface] Checking "vboxnet0" interface status (  QHostAddress( "192.168.56.1" )  )
Mar 12 13:14:24 [Genymotion Player] [debug] [VBox] [getSavedHostOnlyInterface] "vboxnet0" Interface seems compatible
Mar 12 13:14:24 [Genymotion Player] [debug] [VBox] Call: ("list", "dhcpservers")
Mar 12 13:14:24 [Genymotion Player] [debug] [VBox] Return code: 0
Mar 12 13:14:24 [Genymotion Player] [debug] [VBox] [checkIfInterfaceHasValidDhcp] "HostInterfaceNetworking-vboxnet0" DHCP server is associated with "vboxnet0" interface
Mar 12 13:14:24 [Genymotion Player] [debug] [VBox] [checkIfInterfaceHasValidDhcp] "vboxnet0" interface is compatible
Mar 12 13:14:24 [Genymotion Player] [debug] [VBox] Call: ("--version")
Mar 12 13:14:24 [Genymotion Player] [debug] [VBox] Return code: 0
Mar 12 13:14:24 [Genymotion Player] [debug] [VBox] VM engine version: "4.3.36_Ubuntur105129"
Mar 12 13:14:24 [Genymotion Player] [debug] [VBox] Call: ("showvminfo", "S7_API23")
Mar 12 13:14:24 [Genymotion Player] [debug] [VBox] Return code: 0
Mar 12 13:14:24 [Genymotion Player] [debug] [VBox] Call: ("guestproperty", "enumerate", "S7_API23")
Mar 12 13:14:24 [Genymotion Player] [debug] [VBox] Return code: 0
Mar 12 13:14:24 [Genymotion Player] [debug] [VBox] Call: ("showvminfo", "S7_API23")
Mar 12 13:14:25 [Genymotion Player] [debug] [VBox] Return code: 0
Mar 12 13:14:25 [Genymotion Player] [debug] [VBox] Call: ("showvminfo", "S7_API23")
Mar 12 13:14:25 [Genymotion Player] [debug] [VBox] Return code: 0

但是应用在HTC ONE (API 17)上成功运行了。问题出在哪里,我该如何解决呢?这个apk文件来自于Play Store,所以apk文件没有问题。


Genymotion不需要任何额外的arm-翻译包。请尝试使用干净的设备。如果您的应用程序崩溃,必须有堆栈跟踪信息。您是否使用Crashlytics?调试版本是否也会崩溃?这可能是由于API 23中的更改而不是模拟器本身引起的。例如,如果您在运行时未检查权限,则API 23上的应用程序可能会崩溃。 - Eugen Pechanec
1
感谢您的评论,我使用该程序包是因为在安装过程中出现了以下错误:部署文件时发生错误。这可能意味着应用程序包含ARM本地代码,而您的Genymotion设备无法运行ARM指令。您应该将您的本地代码构建为x86,或者在您的设备上安装一个ARM翻译工具。 - user3806649
不需要使用Genymotion,只需使用默认的模拟器和Intel HAXAM。 - amorenew
我需要在Genymotion上运行它! - user3806649
2个回答

1
有时在Windows运行Android Studio和Genymotion时会出现此错误,如果您的电脑/笔记本电脑的CPU和RAM不足,2周前我使用了Genymotion,并且经常遇到这个错误。
要解决此错误,请按照以下步骤进行:
1-尝试在BIOS中启用硬件虚拟化
2-尝试重新安装应用程序,可能有所帮助或尝试清除数据。
3-将vBox(Virtual Box)更新为最新版本。
4-尝试将Genymotion更新为最新版本。
5-有时当您使用另一个模拟器(如Bluestacks)时会发生此错误,请尝试卸载Bluestakcs并使用一个模拟器或更改模拟器的端口。
如果以上方法都无效,请尝试使用其他模拟器,例如nox,andy等。
希望能帮到您。

谢谢你的答复。硬件虚拟化已启用,所有 Genymotion 设备都能正常运行。我已尝试卸载并重新安装应用程序,但是未能解决问题,此外我的 Virtual Box 和 Genymotion 都是最新版本。由于我想在不同的 API 中检查该应用程序,因此选择了 Genymotion 作为模拟器。 - user3806649

1
似乎问题是由于“arm-translation”引起的。我找到了应用程序apk的“x86”版本,并且可以在所有Genymotion设备上安装它,而不需要使用“arm-translation”进行刷机。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接