Upgrading from AGP 7.4.2 to 8.x causes a previously working android project to produce the compile error:
filename extracted from path /home/user/.gradle/caches/transforms-4/16c9c480f14ca901b62b3ace2fbca16c/transformed/filename/armeabi-v9a/libfile.so is not an ABI
I have read the associated bug on the bugtracker, and also the other SO question. Both threads focus on building your own library and workarounds for that case, but they do not apply to my case:
I have a 3rd party provided .jar file with native libraries and class files. The structure of the .jar file is lib/<arch>/<lib>.so
and the class files are included with the namespace starting at the root.
It compiles and works fine in 7.4.2, but when upgrading to 8.+, I get the error.
It looks like gradle extracts the .jar file to its cache without the lib
folder, but the toAbiRootedPath
still assumes it’s there (so it grabs the wrong parent folder?).
If I modify the .jar file to eliminate the lib
folder, so that the file structure is <arch>/<lib>.so
, then it gets past the check in toAbiRootedPath
with no error, but at runtime Android is unable to find the .so files and I get an UnsatisfiedLinkError
.
I’m not really sure what else to try.