At the end of the day it turns out that I've been misled by the error. It turns out that the library I was trying to run doesn't work on an emulator, but it works on a proper device. Importing an .aar library from a local directory as described in original post works fine.