Android common error handling (2) and android common error handling
The test month is very busy. After the test, you can continue to write code and learn more ...... I hope you will give me more advice ~
1. java. lang. OutOfMemoryError
2. Images cannot be filled with ImageView
This solution is actually quite simple. Use the setScaleType () method of ImageView and select fitXY as the parameter .. If the image is distorted, The centerCrop parameter is used.
3. RuntimeError: You cannot combine custom titles with other title features
This error means that you cannot mix multiple title styles. There are several solutions:
Iv. Jar mismatch! Fix your depedenciesMost of the errors occur when multiple packages are imported to a project. The main cause is that different packages may use different jar packages. Take me for example:
I used library1, library2, And the android-support-v4.jar of the project itself, and this error occurs, saying that I have three packages and cannot identify which one to use. The solution is to unify the jar of the three packages, so there is such an approach on the Internet:
Replace all the jar files in the library with the jar files of the project. But I think another method on StackOverflow is better:
First use the Add Support Library in Android Tools for your project, and then remove all the android-support-v4.jar, add external jar to the build path menu for each Project or Library, or choose Project Properties> Android> Library> Add... to ensure the consistency of the package.
V. ClassNotFoundException
This error may be because the package is not completely imported. It may be because the class name to be started is not written on AndroidManifest.