SQLiteException: cannot start a transaction within a transaction (code 1)

I found a workaround: close the DB and open it again. That will update the transaction status correctly.

I still reported to Android as issue nº74751.


This appears to be a bug in Android. In the SQLiteSession class, endTransactionUnchecked clears its transaction state (mTransactionStack) before the COMMIT is executed, and does not expect that the database's transaction might still be active. (I don't think this can ever happen without a deferred constraint.)

Submit a bug report.