不幸的是应用程序已经在Android模拟器停止 [英] Unfortunately app has stopped in Android Emulator

查看:275
本文介绍了不幸的是应用程序已经在Android模拟器停止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新来的Andr​​oid,我想了几个小的应用程序(如指南针)。当我运行仿真器中的应用程序,它给人的消息不幸的是,指南针已停止

我没有编译时错误。

我要如何解决这个问题,什么原因造成的?

在此先感谢。

解决方案

我有同样的错误信息,结果发现,在注释掉的用途,允许节点在AndroidManifest.xml中我注释掉一人需要的

。当我把它放回应用程序运行得很好。我能够重现错误。我所需要的:

<使用-权限的Andr​​oid:名称=android.permission.ACCESS_NETWORK_STATE/>

这是一个准系统的index.html,单页的应用程序,它显示的Hello World。 而上面的许可,是我需要做的运行方式/ Android应用程序,让它在一个模拟器中运行的唯一的一个。

心连心

I am new to Android and I am trying a few small apps (like Compass). When I run the app in the emulator, it gives the message Unfortunately, Compass has Stopped.

I have no compile time errors.

How do I solve this, and what is causing this?

Thanks in advance.

解决方案

I had the same error message and found that, in commenting out uses-permission nodes in AndroidManifest.xml I had commented out one that was needed. When I put it back in the app ran fine. I was able to reproduce the error. I needed:

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

This was for a barebones index.html, single page app, that displays Hello World. And the permission above was the only one I needed to do Run As/ Android Application and get it to run in an emulator.

HTH

这篇关于不幸的是应用程序已经在Android模拟器停止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆