简体   繁体   English

Android安装apk到设备给出[SEGMENTATION FAULT]

[英]Android installing apk to device gives [SEGMENTATION FAULT]

i have a problem. 我有个问题。 When i am trying to deploy (Debug or Run) my App with the AndroidStudio, i get the following error in the RunLog 当我尝试使用AndroidStudio部署(调试或运行)我的应用程序时,我在RunLog中收到以下错误

Waiting for device.
Target device: samsung-galaxy_nexus-WOVCBUF6BAGENRTO
Uploading file
    local path: C:\Users\Abracadabra\Desktop\......\app\build\outputs\apk\app-debug.apk
    remote path: /data/local/tmp/xxx.xxx.app
Installing xxx.xxx.app
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/xxx.xxx.app"

Segmentation fault

It works fine when i try to deploy it to the genymotion VM. 当我尝试将其部署到genymotion VM时,它工作正常。 It just does not work on my real device. 它只是在我的真实设备上不起作用。 It did work before, but i have cleaned up some folders there with the rootExplorer, for example i deleted a folder called ".Idea". 它以前工作过,但我已经使用rootExplorer清理了一些文件夹,例如我删除了一个名为“.Idea”的文件夹。 Maybe this was a big mistake? 也许这是一个大错误? Is this the reason why it does not work anymore? 这是它不再起作用的原因吗?

By the way, logcat is working fine for the rest of the phone. 顺便说一下,logcat对于手机的其余部分工作正常。

Thanks for any help! 谢谢你的帮助!

PS I also installed a fresh android with the CWM recovery tool and wiped all user and cache data -> did not help. PS我还安装了一个带有CWM恢复工具的新机器人并擦除了所有用户和缓存数据 - >没有帮助。

PPS I found out, that the apk is in /data/local/tmp on the phone. PPS我发现,apk在手机上的/ data / local / tmp中。 I can install it manually with the rootExplorer. 我可以使用rootExplorer手动安装它。 but debugging is also not possible :/ 但调试也是不可能的:/

PPPS: I also have tried "adb install", also gives me segmentation fault. PPPS:我也试过“adb install”,也给我分段错误。

It seems that copy is possible, but installation not. 似乎复制是可能的,但安装不是。

Found out the reason. 找出原因。 (a quite stupid one) (一个非常愚蠢的人)

I forgot to enable "Security Settings -> Unknown Sources" 我忘了启用“安全设置 - >未知来源”

I encountered the same problem. 我遇到了同样的问题。

Waiting for device.
Target device: samsung-gt_n7100-4df180b77e139fdd
Uploading file
    local path: C:\Users\Harshal\AndroidStudioProjects\MyFirstApp\CurrentAffairs\app\build\outputs\apk\app-debug.apk
    remote path: /data/local/tmp/com.softcode.anupreet.currentaffairs
Installing com.softcode.anupreet.currentaffairs
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.softcode.anupreet.currentaffairs"
Segmentation fault

I downloaded the 'Terminal Emulator' app on my device and ran the below two commands, it was a success. 我在我的设备上下载了“终端仿真器”应用程序并运行了以下两个命令,这是成功的。

su -o pm install -r "/data/local/tmp/com.softcode.anupreet.currentaffairs"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM