简体   繁体   English

无法在设备上部署(Android MarshMallow Asus Zenfone 3)

[英]Can't deploy on device (Android MarshMallow Asus Zenfone 3)

I have a weird problem. 我有一个奇怪的问题。

It happens on any xamarin project (Xamarin forms project in my case). 它发生在任何xamarin项目上(以我的情况为Xamarin表单项目)。 I can run it on my Android api 22 (Samsung Core prime) and on a simulator but I cannot deploy it on my Android api 23 (Asus Zenfone 3). 我可以在Android api 22(三星Core Prime)和模拟器上运行它,但不能在Android api 23(Asus Zenfone 3)上部署它。 I get Index was outside the bounds of the array in the error panel. 我得到索引超出了错误面板中数组的范围。 I tried on my mac and on my pc. 我在Mac和PC上尝试过。 If I remember well, I was able to deploy on my Zenfone before an update. 如果我还记得的话,我可以在更新之前在Zenfone上进行部署。 After that, there is no way 在那之后,没有办法

This is what I get in the output panel : 这是我在输出面板中得到的:

[E:]:                     
Deployment failed System.IndexOutOfRangeException: Index was outside the bounds of the array.    
at Mono.AndroidTools.AndroidInstalledPackage..ctor(String value)    
at Mono.AndroidTools.Internal.AdbOutputParsing.ParseLastResortPackageList(String output)    
at Mono.AndroidTools.AndroidDevice.<>c__DisplayClass65_0.<GetPackagesLastResort>b__0(Task`1 t)    
at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()    
at System.Threading.Tasks.Task.Execute()

In the diagnostic panel, I have among other (maybe) normal things : 在诊断面板中,我有其他(也许)正常情况:

-- End Broadcast --
[D:RunShellCommand]:   GBAXGY16K66457B cat /data/system/packages.xml
-- Start GetPackages - 04/15/2017 23:34:34 (14.1293ms) --
[INPUT] cat /data/system/packages.xml
[OUTPUT]
/system/bin/sh: cat: /data/system/packages.xml: **Permission denied**
-- End GetPackages --
[D:RunShellCommand]:   GBAXGY16K66457B cat /dbdata/system/packages.xml
-- Start GetPackages - 04/15/2017 23:34:34 (14.5395ms) --
[INPUT] cat /dbdata/system/packages.xml
[OUTPUT]
/system/bin/sh: cat: /dbdata/system/packages.xml: **No such file or directory**
-- End GetPackages --

Rooting my phone is not an option I would like to consider. 我不想考虑让手机扎根。 I would prefer sending it back and buy another one if there is no option. 如果没有选择,我宁愿寄回去再买一本。 Is it a Xamarin bug? 它是Xamarin错误吗? Can I solve this? 我能解决这个问题吗?

Thanks! 谢谢!

Somebody answered my question on another forum. 有人在另一个论坛上回答了我的问题。 I share it here. 我在这里分享。 It looks like that this is a problem related to another app installed on the device. 看来这是与设备上安装的另一个应用程序有关的问题。 Auto-start Manager blocks the Mono Shared Runtime. 自动启动管理器阻止Mono共享运行时。 Open the setting and disable all possible blocks. 打开设置并禁用所有可能的块。 Now it should work 现在应该可以了

Try this: 尝试这个:

Go to Mobile Manager -> 转到移动管理器->

Settings Menu -> 设置菜单->

Disable option: Automatically deny automatic application startup. 禁用选项:自动拒绝自动启动应用程序。

good luck! 祝好运!

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

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