1 Android java.net.UnknownHostException:Unable to resolve Host "...": No address associated error
I often encounter this error when I'm developing Android, and in general, there are two most common scenarios that cause this 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.
Network access rights
2 Failed to install *.apk on device ' emulator-5554′: timeout
Error message:
Failed to install helloworld.apk on device ' emulator-5554′: timeout
Or
The user data image is used
Reason:
Due to the simulator being turned on without shutting down or illegally shutting down.
Workaround:
Delete the corresponding version of C:documents and SETTINGSADMINISTRATOR.ANDROIDAVD. AVD
Under All folders ending with. Lock.
Or
Failed to install *.apk on device *:
Timeout Launch canceled!
There is another way:
In WINDOW->PREFERENCES->ANDROID->DDMS->ADB connection time Out (ms):
Set this value to a larger number, default to 5000, set to 500000, and then OK.
3 This Android SDK requires andriod Developer Toolkit version 20.0.0 or above
Open Eclipse (Android development environment) and find the following error:
The picture display information is: Android SDK requires ADT (Android Developer Toolkit) version in 20.0.0 or later, detects that the current version is 18.0.0, please update the latest ADT.
The root cause of this is that the E:program Filesandroid-sdk-windowstoolslibplugin.prop file contents are detected when Eclipse starts:
Begin Plugin.prop
plugin.version=20.0.0
# End Plugin.prop
This is easy to understand, the requirements plug-in version of 20.0.0, this time we only need to change to:
Begin Plugin.prop
plugin.version=18.0.0
# End Plugin.prop
OK, restart Eclipse and see if this solves the problem.
4 [Accessibility] Missing contentdescription attribute on image
Today the next ADT 16.0 is used to define a imageview and always prompt this [accessibility] Missing contentdescription attribute on image warning, although it can be ignored but always feel strange, Found on the Internet a new feature of ADT 16.0, in some non-text display controls, such as ImageView and ImageButton, ADT will prompt you to define a Android:contentdescription property, Used to describe the effect of this control. The English text is as follows, please criticize if there is a wrong place to translate.
Resolved this warning by setting attribute android:contentdescription for my ImageView
android:contentdescription= "@string/desc"
Android Lint Support on ADT throws this warning to ensure that image widgets provide a contentdescription
This defines text that briefly describes content of the view. Used primarily for accessibility. Since Some views does not have the textual representation this attribute can is used for providing such.
Non-textual widgets like Imageviews and imagebuttons should use the ContentDescription attribute to specify a textual desc Ription of the widget such that screens readers and other accessibility tools can adequately describe the user interface.
5 Java.lang.NoClassDefFoundError:com.baidu.mapapi.BMapManager Solutions
With Baidu Map, may have copied some of the project location error
Workaround:
1. Right-click the project->properties->java Build Path->order and Export and tick the front of the package that needs to be referenced.
2.project->clean ...
6 in Eclipse hint no completions available,alt+/not automatically prompt
window-> preferences-> java-> editor-> Content assist-> Advanced
Above tab select the proposal kinds contained in the ' Default ' content Assist list Add "Java Non-type proposals"
Set of Android Error resolution methods