Solution: UnsatisfiedLinkError with android modules

You must Login before you can answer or comment on any questions.

I am setting up a new build machine, and I had a couple of nightmarish android build issues that I thought I would share with everyone. Maybe it will help somebody else.

My second problem: once I got the app compiling, everything seemed fine, but when I launched the app, it crashed immediately with this message:

java.lang.UnsatisfiedLinkError: Library ti.admob not found
I took an old, working apk file and one of the newly built ones, used unzip -t to list at the contents, then diff-ed the two lists. I saw that my working apk file had two .so files that were missing in the broken apk:
lib/armeabi/libti.admob.so
lib/armeabi-v7a/libti.admob.so
The problem, it turns out, is that subversion had ignored my .so files when I checked the admob module into the repository. When I checked out the source onto the new machine, I had no .so files.

Obviously, this is an issue with subversion. But the issue with Titanium is that the compiler was unaware of the missing files, or at least, it did not present me with any sort of error. It happily built the apk, sans .so files.

Unzipping the modules again restored the .so files (and then I explicitly checked them into subversion so this won't happen next time!).

— asked 10 months ago by Jason Priebe
1 Comment
  • Compiler cannot check .so files as they are pre-compiled C language libraries and don't require recompilation. These files are linked at runtime by the OS. During the build process these files are bundled with the apk so as to be picked by the OS while running the app. Though the issue you faced is common and the common solution is to remove them from ignore list of subversion while performing the checkin but you had your own solution which worked.

    — commented 10 months ago by Perminder Singh Bhatia

Your Answer

Think you can help? Login to answer this question!