문제

I'm doing some database work on Android, and get the following error when trying to insert a bunch of records using applyBatch.

java.lang.ArrayIndexOutOfBoundsException: asked for back ref 26 but there are only 0 back refs

What's causing this?

도움이 되었습니까?

해결책

For me, it turns out that I was trying to insert a group of records using applyBatch, but one of the later records depended on an earlier record in the group being inserted correctly, which it wasn't (it failed).

I identified the error by doing "applyBatch" with each of the ContentOperations, one at a time. Then i could easily see why it was failing.

Note that this post was helpful in figuring out the problem.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top