Beginner Android, recently in the use of zxing to develop a barcode scanning analysis of the Android project, encountered the following issues. Post it for reference.
1. HTTP request Error
Android4.0 above requires that the operation of the network request cannot be placed in the main thread. Use multithreading.
2, Java.lang.IllegalStateException:Target host must not is NULL, or set in parameters.
Cause: The connection address is not complete, you must add "http://".
3. Android Java.net.UnknownHostException:Unable to resolve Host "...": No address associated error
1.android Device Network connection not open, such as 3G Network and WiFi network. So, if you encounter this error, check to see if your network is connected properly.
2.Manifest file does not indicate network access rights
If you confirm that the network is connected properly and this error, then please see if your manifest file indicates that the application requires network access, if not indicated, also can not access the network, it will also cause this situation.
<uses-permission android:name= "Android.permission.INTERNET"/>//Network access rights
4. In Android, activity-initiated threads are not allowed to access the UI component in the activity, causing the newly-started thread to change the UI component's property values.
Using handler to send messages to and from processing threads
Part of the error resolution during Android development.