see my comment on line from patch do you really need to save this work across manifest files  locations are sometimes heavy weight so you should try to only create them for actual errors  not for all potential error locations  if you really need to hold placeholder objects that you may eventually need to refer to  from a different file  when lint may no longer be holding a read lock on the current context file use xmlcontext createlocationhandle instead  which will return a handle to you which you can call  resolve on when you decide you need a real location for an error report call 