Today I encountered such a problem and solved it. I know what is going on.
Java. lang class IllegalArgumentExceptionjava. lang. Object java. lang. Throwable java. lang. Exception java. lang. RuntimeException java. lang. IllegalArgumentException
The explanation of java. lang. IIIegalArgumentException is as follows:
The exception thrown by public class IllegalArgumentExceptionextends RuntimeException often indicates that an invalid or incorrect parameter is passed to the method.
Find the row with the error:
Cursor c = db.rawQuery("select * from tablename where cntrct_no=? AND product_code=?",new String[]{cntrct_no, product_code});while (c.moveToNext()) { }
Here I want to call the database and obtain the query result. I tracked the problem. The cntrct_no value I passed is null, he suggested that the bind value at index is null. I always thought that the second column of the index was incorrect when the data in the while column was obtained. Later I realized that it was a problem with the first number of data bound here.