1. 运行程序后弹出: The application *** has stopped
unexpectedly. Please try again. 然后会要祈求强制退出。
这是一个经典错误, Socket不能对外连接,具体错误不会被
报出,调试的时候,但能看到Exception,, 只要存在网络互联,
就挺身而出,让你的程序不得运行。
原因是: 需要访问到网络,所以,在AndroidManifest.xml
中,需要进行如下配置:
在下面第三个页面permission中,选择“Add...”选择“uses
permission”,在右面name中选择
“android.permission.INTERNET” ;然后在
AndroidManifest.xml中会出现下面语句:
<uses-permission
android:name="android.permission.INTERNET" />
再次运行程序,就OK了。
2. 出现错误“The *** has not responding”:
原因有如下几种:服务器没有打开、
客户端要连接的IP不对、
Server和Client的端口不一致
、
客户端与服务器的接收和发送
没有一一对应,
导致等待超时,出现异常。
但是我的问题还为解决?
3。在学习Android的时候,偶尔会遇到异常。像要是遇到异常:“The application has stopped
unexpectedly”的时候,首先去查看自己的代码是否有逻辑上的错误或者是漏洞,例如是不是使用了一个null对象。对象使用之前是否已经实例
化。另外针对Android要特别注意,整个的程序中要关心的有三个部分:
业务逻辑--即逻辑上是否合理,代码部分是否正确。这个主要可以通过调试运行查看Log记录。
资源应用--Android的资源都放在了res文件下面,如Activity的布局一般都放在res/layout下面,并且一般是一个xml文件对应一个Activity。
AndroidManifest.xml--之前我在学习别人一个例子的时候就忽略了这个非常重要的东西,才导致了The application has stopped unexpectedly的发生。
分享到:
相关推荐
20210222-中金公司-海外策略:GameStop事件,Game_Stopped?.pdf
SEVERE: The web application [/xxx] registered the JDBC driver [org.logicalcobwebs.proxool.ProxoolDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the...
海外策略:GameStop事件,Game_Stopped?
office 2013 EPM插件,EPM add-in for Microsoft Office 是在由SAP BusinessObjects开发类别 Miscellaneous Shareware 软件。EPM系统插件add-in安装 - EPM 系统插件 Add-in 安装 说明: Add-in 为依附在 excel 上的一...
* It has been successfully tested under J2SE 1.3.x, 1.4.x and 1.5.x. */ @SuppressWarnings("unchecked") public class BasicPlayer implements BasicController, Runnable { public static int EXTERNAL_...
heob-堆观察者 ... 在源目录中运行build.bat 。 笔记: 要在具有DWARF调试信息(gcc)的可执行程序的堆栈跟踪中获取文件/行信息,dwarfstack.dll需要可用。 有关PDB调试信息,请使用dbghelp.dll。
信息: Illegal access: this web application instance has been stopped already. Could not load net.sf.ehcache.store.disk.DiskStore$KeySet. The eventual following stack trace is caused by an error thrown...
报错1: Using python /usr/bin/python ...REASON: Before starting Ambari Server, you must copy the MySQL JDBC driver JAR file to /usr/share/java and set property server.jdbc.driver.path=[path/to/c
程序运行结果如下: Solver stopped prematurely. fgoalattain stopped because it exceeded the function evaluation limit, options.MaxFunctionEvaluations = 400 (the default value). x = 0....
This library allows launching a custom activity when the app crashes, instead of showing the hated "Unfortunately, X has stopped" dialog. How to use One-step install Add the following dependency to ...
* The classic producer-consumer example. * Illustrates mutexes and conditions. * by Zou jian guo <ah_zou@tom.com> * 2003-12-22 * *************************************************/ #include ...
the window of the application, and CurrPorts will display only the opened ports of this application. * Version 1.60: o Added new column: Window Title (The window title of the process) o Added '...
严重: The web application [/img] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been...
* The packet has been retrieved from the transmission * medium. Build an skb around it, so upper layers can handle it */ skb = dev_alloc_skb(pkt->datalen + 2); if (!skb) { if (printk_ratelimit()...
- Changed the mechanism to check for the required DirectX Direct3D as the previous method did not work on some system (some W2003 servers). - Enhanced the mechanism to report memory hardware errors ...
- The driver could crash when the driver was stopped (either by hand or when the demo time was expired) and in the same moment the NetLink connection was disturbed. - Improvements on the seamless ...
To fix "Google Play Services has stopped" errors, try opening the app info dialog and select "clear cache". If that does not work, try the "uninstall updates" option. Then download and re-install the ...
Ubuntu16.04编译Android源码... Please make sure the device-vendor.mk is correctly included.. ##编译报错(二) ninja: build stopped: subcommand failed. ###编译报错(三) fatal: fork: Cannot allocate memory