Android Error Log analysis

Source: Internet
Author: User
<span id="Label3"></p><p align="center"><p align="center"><strong>Android Error Log analysis</strong></p></p><p align="left"><p align="left">1. java.lang.nullpointerexception</p></p><p align="left"><p align="left">This exception is often encountered, the exception of the explanation is "the program encountered a null pointer", simply called an uninitialized object or a non-existent object, This error often occurs in the creation of images, call array of these operations, than the slice is not initialized, or the image is created by the path error, and so On. A null pointer appears in an array operation, and in many cases is a common mistake made by friends who are just beginning to learn programming, which confuses the initialization of arrays and the initialization of the array Elements. The initialization of an array is the space required for the allocation of arrays, and the initialized array, where the elements are not instantiated, are still empty, so you also need to initialize each element (if it is to be called).</p></p><p align="left"><p align="left">2. java.lang.classnotfoundexception</p></p><p align="left"><p align="left">This anomaly is a lot of developers originally developed in the development environment such as jb, put JB under the package under the WTK to compile frequently problems, the explanation of the exception is "the specified class does not exist", here the main consideration is the name and path of the class is correct, if it is in JB under the package, It is usually the default plus package, so go to the WTK and pay attention to add the package path.</p></p><p align="left"><p align="left">3. java.lang.arithmeticexception</p></p><p align="left"><p align="left">The explanation of this anomaly is "mathematical operation anomaly", for example, The program appears divided by 0 such an operation will be such an exception, for this anomaly, we will have to check the application of their own procedures involved in the mathematical operation of the place, the formula is not Inappropriate.</p></p><p align="left"><p align="left">4. Java.lang.arrayindexoutofboundsexception</p></p><p align="left"><p align="left">This exception is believed many friends also often encountered, abnormal explanation is "array subscript out of bounds", now most of the program has an array of operations, so in the call arrays must be carefully checked, to see whether the subscript is beyond the range of the array, in general, The display (that is, directly with the constant Subscript) call is not easy to make such a mistake, but the implicit (that is, the use of Variable-subscript) calls are often wrong, there is also a case, the length of the array defined in the program is determined by certain methods, is not declared beforehand, it is better to look at the array length, To prevent this exception from Occurring.</p></p><p align="left"><p align="left">5. Java.lang.illegalargumentexception</p></p><p align="left"><p align="left">The explanation of this exception is "parameter error of the method", and many methods in the J2ME class library can cause such errors in some cases, such as the volume parameter in the volume adjustment method, if it is written as a negative number, then the exception will occur, such as G.setcolor (int red,int green,int Blue) three values in this method, if there are more than 255 of the exception will also occur, so once the exception is found, we have to do is to quickly check the method call in the parameter passed is not an error occurred.</p></p><p align="left"><p align="left">6. Java.lang.illegalaccessexception</p></p><p align="left"><p align="left">This exception is interpreted as "no access", which occurs when the application is calling a class, but the current method does not have access to the class. Be aware of this exception in cases where the package is used in the Program.</p></p><p align="left"><p align="left">There are many other exceptions, I will not enumerate, I would like to state that a qualified programmer, the program needs to have a good understanding of common problems and corresponding solutions, otherwise just stay in writing procedures and will not change the program, will greatly affect their own development. The full description of the exception is available in the Api.</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Arithmetic Exception class: Arithmeticexecption</p></p><p align="left"><p align="left">Null pointer exception class: NullPointerException</p></p><p align="left"><p align="left">Type cast exception: classcastexception</p></p><p align="left"><p align="left">Array negative subscript exception: negativearrayexception</p></p><p align="left"><p align="left">Array subscript out-of-bounds exception: arrayindexoutofboundsexception</p></p><p align="left"><p align="left">Violation of security principle exception: secturityexception</p></p><p align="left"><p align="left">File ended Exception: eofexception</p></p><p align="left"><p align="left">File not found Exception: FileNotFoundException</p></p><p align="left"><p align="left">string conversion to numeric exception: numberformatexception</p></p><p align="left"><p align="left">Manipulating Database Exceptions: SQLException</p></p><p align="left"><p align="left">Input/output exception: IOException</p></p><p align="left"><p align="left">Method not found Exception: nosuchmethodexception</p></p><p align="left"><p align="left">Java.lang.AbstractMethodError</p></p><p align="left"><p align="left">Abstract method Error. Thrown when an application tries to invoke an abstract method.</p></p><p align="left"><p align="left">Java.lang.AssertionError</p></p><p align="left"><p align="left">Assertion is Wrong. Used to indicate a condition in which an assertion Failed.</p></p><p align="left"><p align="left">Java.lang.ClassCircularityError</p></p><p align="left"><p align="left">Class Loop-dependent Error. When a class is initialized, the exception is thrown if a circular dependency between the classes is Detected.</p></p><p align="left"><p align="left">Java.lang.ClassFormatError</p></p><p align="left"><p align="left">The class format is Incorrect. Thrown when a Java virtual machine attempts to read a Java class from a file and detects that the contents of the file do not conform to the valid format of the class.</p></p><p align="left"><p align="left">Java.lang.Error</p></p><p align="left"><p align="left">Error. is the base class for all errors that identify serious program run Issues. These problems often describe anomalies that should not be captured by the Application.</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Java.lang.ExceptionInInitializerError</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Initialization program Error. Thrown when an exception occurs during the execution of a static initializer for a class. Static initializers refer to static statement segments that are included directly in the class.</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Java.lang.IllegalAccessError</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Illegal access Error. This exception is thrown when an application attempts to access, modify, or invoke the domain (field) of a class or call its methods, but violate the visibility declaration of a domain or method.</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Java.lang.IncompatibleClassChangeError</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Incompatible class Change Error. This exception is thrown when an incompatible change is made to the class definition on which the method being executed depends. This error is easily thrown when you modify the declaration definition for some classes in your app without recompiling the entire Application.</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Java.lang.InstantiationError</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Instantiation of the Error. This exception is thrown when an application attempts to construct an abstract class or interface through Java's new Operator.</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Java.lang.InternalError</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Internal Error. Used to indicate an internal error occurred with the Java virtual MACHINE.</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Java.lang.LinkageError</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Link Error. The error and all its subclasses indicate that a class depends on another class, and after that class is compiled, the dependent class changes its class definition without recompiling all of the classes, which in turn raises the error Condition.</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Java.lang.NoClassDefFoundError</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Class definition error not Found. This error is thrown when a Java virtual machine or class loader attempts to instantiate a class and cannot find the definition of the class.</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Java.lang.NoSuchFieldError</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">There are no errors in the Domain. This error is thrown when an application attempts to access or modify a domain of a class that does not have a definition of that domain in the definition of that class.</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Java.lang.NoSuchMethodError</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Method has no Errors. This error is thrown when an application attempts to invoke a method of a class that does not have the definition of the method in the definition of the class.</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Java.lang.OutOfMemoryError</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Insufficient memory Error. This error is thrown when the available memory is insufficient for a Java virtual machine to be assigned to an Object.</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Java.lang.StackOverflowError</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Stack Overflow Error. This error is thrown when the hierarchy of an application recursive call is too deep to cause a stack overflow.</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Java.lang.ThreadDeath</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">The thread ends. This error is thrown when the stop method of the thread class is called to indicate the end of the Thread.</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Java.lang.UnknownError</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Unknown Error. Used to indicate a situation in which a Java virtual machine has an unknown critical error.</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Java.lang.UnsatisfiedLinkError</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">An unsatisfied link Error. Thrown when a Java virtual machine does not find a class that is declared as a native language definition of the native method.</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Java.lang.UnsupportedClassVersionError</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Unsupported class version Error. This error is thrown when the Java Virtual machine attempts to read a class file, but discovers that the primary and minor version number of the file is not supported by the current Java virtual MACHINE.</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Java.lang.VerifyError</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Validation Error. This error is thrown when the validator detects an internal incompatibility or security issue in a class File.</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Java.lang.VirtualMachineError</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Virtual Machine Error. A condition that indicates that the virtual machine is compromised or that the resource required to continue performing the operation is Insufficient.</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Java.lang.ArithmeticException</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Arithmetic condition Exception. For example: integers except 0.</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Java.lang.ArrayIndexOutOfBoundsException</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Array index out-of-bounds Exception. Thrown when the index value of an array is negative or greater than or equal to the size of the Arrays.</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Java.lang.ArrayStoreException</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Array Storage Exception. Thrown when a Non-array declaration type object is placed into the array.</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Java.lang.ClassCastException</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Class Shape Exception. Assuming that there are classes A and B (a is not a parent or subclass of b), and O is an instance of a, the exception is thrown when an O is forced to be constructed as an instance of Class B. This exception is often called coercion type conversion Exception.</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Java.lang.ClassNotFoundException</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">The class exception could not be found. This exception is thrown when an application attempts to construct a class based on a class name in string form, and when a class file of the corresponding name is not found after traversing Classpah.</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Java.lang.CloneNotSupportedException</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Cloning exceptions are not supported. When the Cloneable interface is not implemented or the Clone method is not supported, the exception is thrown by calling its clone () Method.</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Java.lang.EnumConstantNotPresentException</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">An enumeration constant does not have an Exception. This exception is thrown when an application attempts to access an enumeration object by name and enumeration type, but the enumeration object does not contain a constant.</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Java.lang.Exception</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">The root Exception. Used to describe what the application wants to Capture.</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Java.lang.IllegalAccessException</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">An illegal access Exception. This exception is thrown when an application attempts to create an instance of a class by reflection, accesses the class property, calls the class method, and then cannot access the definition of a class, property, method, or constructor method.</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Java.lang.IllegalMonitorStateException</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Violations of the monitoring State anomalies. This exception is thrown when a thread tries to wait for a monitor that does not own the object (o) or notifies other threads to wait for the object (o).</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Java.lang.IllegalStateException</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">An abnormal state of LAW. This exception is thrown when the Java environment and the application are not already in the legal invocation state of a method, and the method is Called.</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Java.lang.IllegalThreadStateException</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">An illegal thread state Exception. An exception is thrown when the county seat is not in the legal calling state of a method and the method is Called.</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Java.lang.IndexOutOfBoundsException</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Index out-of-bounds Exception. This exception is thrown when an index value that accesses a sequence is less than 0 or greater than or equal to the sequence Size.</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Java.lang.InstantiationException</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Instantiate the Exception. This exception is thrown when an attempt is made to create an instance of a class through the newinstance () method, which is an abstract class or interface.</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Java.lang.InterruptedException</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Aborted Exception. This exception is thrown when a thread is in a long wait, hibernate, or other paused state while another thread terminates the thread through the interrupt method of the Thread.</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Java.lang.NegativeArraySizeException</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">The array size is a negative value Exception. This exception is thrown when an array is created with a negative size Value.</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Java.lang.NoSuchFieldException</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">No exception exists for the Property. This exception is thrown when a property that does not exist for a class is Accessed.</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Java.lang.NoSuchMethodException</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Method has no Exception. This exception is thrown when a non-existent method of a class is Accessed.</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Java.lang.NullPointerException</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Null pointer Exception. This exception is thrown when an app tries to use null where the object is Required. For Example: call An instance method of a null object, access the properties of a null object, evaluate the length of a null object, throw null with a throw statement, and so On.</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Java.lang.NumberFormatException</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Number Format Exception. This exception is thrown when an attempt is made to convert a string to the specified number type, and the string does not satisfy the format required by the number Type.</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Java.lang.RuntimeException</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Run-time Exception. is the parent class of exceptions that can be thrown during normal operation of all Java virtual Machines.</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Java.lang.SecurityException</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Security Exception. Thrown by the security manager to indicate an exception that violates the security Situation.</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Java.lang.StringIndexOutOfBoundsException</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">String index out of bounds Exception. This exception is thrown when an index value is used to access a character in a string, and the index value is less than 0 or greater than or equal to the sequence Size.</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Java.lang.TypeNotPresentException</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">There is no exception for Type. When an application tries to</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Java.lang.StackOverflowError</p></p><p align="left"><p align="left"></p></p><p align="left"><p align="left">Stackoverflowerror is due to the current Thread's full stack, which is caused by too many function call Levels. such as Death Recursion.</p></p><p><p>Android Error Log analysis</p></p></span>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.