Android development FAQ Summary
[Error message] [16:39:10-ApiDemos] WARNING: Application does not specify an API level requirement! [16:39:10-ApiDemos] Device API version is 8 (Android 2.2) cause: normal operation is not affected. In AndroidManifest. no API version is added to the xml file. <manifest> </manifest> is added to the <uses-sdk android: minSdkVersion = "3"> </uses-sdk> [16:55:04-ApiDemos] Installation error: INSTALL_FAILED_INSUFFICIENT_STORAGE [16:55:04-ApiDemos] Please check logcat output for more details. [16:55:05-ApiDemos] Launch canceled! The device does not have enough storage space to install the application. [error message] [11:46:53] Failed to push selection: Is a directory cause: folder of the queue [09:25:12-ActivityMain]: dxUNEXPECTED TOP-level exception: java. lang. illegalArgumentException: already added: Lorg1/apache/commons/codec/net/RFC1522Codec; [09:25:12-ActivityMain]: Dx at com. android. dx. dex. file. classDe FsSection. add (ClassDefsSection. java: 123) [09:25:12-ActivityMain]: Dx at com. android. dx. dex. file. dexFile. add (DexFile. java: 143 )..... [09:25:12-ActivityMain]: Dx1 error; aborting [09:25:12-ActivityMain] Conversion to Dalvik format failed with error 1 cause: [error message] occurs when Eclipse is started: this android sdk requires android developer toolkit version 10.0.0 or abve. current version is 8.0.1.v201012062107-82219. please update adt to the latest version reason: Eclipse Android development plug-in version is too low, should download ADT-10.0.0, and 1. start Eclipse, go to Help> Install New Software.2. in the Available Software dialog box, click Add .... [error message] [15:21:34-Info] Failed to install Info.apk on device '? ': Unable to open sync connection! [15:21:34-Info] java. io. IOException: Unable to open sync connection! [15:21:34-Info] Launch canceled! Cause: Disable the simulator and eclipse, execute the adb kill-server command, and then try again [error message] java.net appears when Webservice is called. socketException: Permission denied (maybe missing INTERNET permission) reason: You need to access the network, so in AndroidManifest. <uses-permission android: name = "android. permission. INTERNET "/> [error message] org. xmlpull. v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/?envelope (position: START_TAG <{http: // sche Mas.xmlsoap.org/wsdl/javaswsdl:definitions targetNamespace = 'HTTP: // bo.webservice.nqbx.nq.com '> @ 2: 603 injava. io. inputStreamReader @ 44a3a7b0) may be one of the following two reasons: 1) the Soap version of the Webservice server is 1.0, so the client specifies SoapSerializationEnvelope envelope = new SoapSerializationEnvelope (SoapEnvelope. VER11); VER11 changed to VER102) String serviceUrl = "http: // 200.200.200.11: 10000/nqbx/service/InqBxWebService? Wsdl "; Url refers to the address of your webservice. Generally, it is ***. wsdl or ***.? The wsdl ends... but it should be noted that the. wsdl or .? Wsdl [error message] public class HttpThread extends Thread {...} in the new Thread {...} add a pop-up form: new AlertDialog. builder (this ). setTitle ("data loading failed "). setMessage ("Check network connection "). setPositiveButton ("OK", new DialogInterface. onClickListener () {public void onClick (DialogInterface dialoginterface, int I ){}}). show (); cause and solution: // The UI interface java cannot be operated in the thread. lang. runtimeException: Can't create handler inside thread that has not called logoff. prepare () After modification: new AlertDialog. builder (com. nantsing. infoquery. chuanbo_detail.this ). setTitle ("data loading failed "). setMessage ("Check network connection "). setPositiveButton ("OK", new DialogInterface. onClickListener () {public void onClick (DialogInterface dialoginterface, int I) {} [error message] The constructor AlertDialog. builder (chuanbo_detail.HttpThread) is undefined. Cause and solution: the UI component cannot be controlled outside the main UI thread. Because you must use various methods to display various prompt messages after the new thread task is completed by sending a message notification task to the UI main thread. There are multiple communication methods between threads. handler is often used to transmit messages. Construct the Message in the thread: // construct the message Message = handle. obtainMessage (); Bundle B = new Bundle (); B. putString ("tag", "1"); message. setData (B); handle. sendMessage (message); custom message:/*** capture message Queue fubin. pan 2011-04-02 */Handler handler = new Handler () {public void handleMessage (Message m) {if (! M. getData (). getString ("tag "). equals ("1 ")){...} else {new AlertDialog. builder (chuanbo_detail.this ). setTitle ("data loading failed "). setMessage ("Check network connection status! "). SetPositiveButton ("OK", new DialogInterface. onClickListener () {public void onClick (DialogInterface dialoginterface, int I ){}}). show () ;}}; [error message] Put the android earlier version Project (such as 1.5) in a later version environment (such as 2.2), the above error may occur. The solution is as follows: 1. If you do not modify the android sdk version, use the project clean command to act on a project. (This processing method is only compatible with lower-version projects in the high version, and is not actually upgraded) 2. If you want to modify the android sdk version, perform the following steps: 1) modify the SDK selection project, build path --> configure build path ---> library, and delete the referenced low-version SDK, add External JARs, select SDK of later version, OK, and save. 2) modify the classpath file. This file may exist: <classpathentry kind = "lib" path = "address of your specified high version" change her to <classpathentry kind = "con" path = "com. android. ide. eclipse. adt. ANDROID_FRAMEWORK "/> 3) Modify AndroidManifest. xml in AndroidManifest. add <uses-sdk android: minSdkVersion = "3 "> </Uses-sdk> 4) Modify default. properties (very important) the last line of the file (not used before #) target = android-3 should be set to target = android-8 and saved. Let's take a look at your project and the new android 2.2 project structure.