I am using Proguard in my android app to reduce the number of methods (see this). For that I have coded some lines in proguard-project.txt file. All the jars work well after the necessary commands. But when I try to integrate Video Chat part of Quickblox, they provide us a .so that I would have to integrate. So I just keep it in the libs\armeabi\libilbc-codec.so path as guided by them. Now the project runs well when I run it without Proguard, but when I compile it with Proguard, it gives me with following error:
11-21 18:18:19.171: E/AndroidRuntime(19825): FATAL EXCEPTION: Thread-34829
11-21 18:18:19.171: E/AndroidRuntime(19825): java.lang.ExceptionInInitializerError
11-21 18:18:19.171: E/AndroidRuntime(19825): at com.quickblox.videochat.core.objects.AudioRecorder$AudioRecorderRunnable.run(AudioRecorder.java:196)
11-21 18:18:19.171: E/AndroidRuntime(19825): at java.lang.Thread.run(Thread.java:864)
11-21 18:18:19.171: E/AndroidRuntime(19825): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load ilbc-codec: findLibrary returned null
11-21 18:18:19.171: E/AndroidRuntime(19825): at java.lang.Runtime.loadLibrary(Runtime.java:365)
11-21 18:18:19.171: E/AndroidRuntime(19825): at java.lang.System.loadLibrary(System.java:535)
11-21 18:18:19.171: E/AndroidRuntime(19825): at com.googlecode.androidilbc.Codec.<init>(Codec.java:16)
11-21 18:18:19.171: E/AndroidRuntime(19825): at com.googlecode.androidilbc.Codec.<clinit>(Codec.java:5)
11-21 18:18:19.171: E/AndroidRuntime(19825): ... 2 more
11-21 18:18:19.281: E/copybit(19825): Error opening frame buffer errno=13 (Permission denied)
I am very noob to using Proguard as well as NDK, so can anyone guide me as how can I overcome this issue? I have added Native support by Right clicking on project -> Android Tool -> Add Native Support.. and selected the .so file I have been using. So can anyone suggest any solution or the lines that I would have to write to this .so file to work ?
Thanks in Advance.
EDIT: After following @ph0b's comment, I tried following steps:
I have removed BDK supprot from the app following this tutorial and also unzipped the apk as per his steps and I am getting my "libilbc-codec.so" library under "/lib/armeabi". But still getting the below error. So what might be wrong now ??
11-24 12:12:29.045: E/AndroidRuntime(6049): FATAL EXCEPTION: Thread-455
11-24 12:12:29.045: E/AndroidRuntime(6049): Process: com.hypersquare, PID: 6049
11-24 12:12:29.045: E/AndroidRuntime(6049): java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/system/framework/com.google.android.maps.jar", zip file "/data/app/com.hypersquare-1/base.apk"],nativeLibraryDirectories=[/data/app/com.hypersquare-1/lib/arm, /vendor/lib, /system/lib]]] couldn't find "libilbc-codec.so"
11-24 12:12:29.045: E/AndroidRuntime(6049): at java.lang.Runtime.loadLibrary(Runtime.java:366)
11-24 12:12:29.045: E/AndroidRuntime(6049): at java.lang.System.loadLibrary(System.java:989)
11-24 12:12:29.045: E/AndroidRuntime(6049): at com.googlecode.androidilbc.Codec.<init>(Codec.java:16)
11-24 12:12:29.045: E/AndroidRuntime(6049): at com.googlecode.androidilbc.Codec.<clinit>(Codec.java:5)
11-24 12:12:29.045: E/AndroidRuntime(6049): at com.quickblox.videochat.core.objects.AudioRecorder$AudioRecorderRunnable.run(AudioRecorder.java:196)
11-24 12:12:29.045: E/AndroidRuntime(6049): at java.lang.Thread.run(Thread.java:818)