How To Link The "lame" Mp3 Encoder Shared Object To An Android Studio Project
I am trying to write an Android app that uses the Lame mp3 encoder. My development environment is Android Studio 1.1. Following the hints under Lame MP3 Encoder compile for Android
Solution 1:
wild ass guess...
Your build is not hooking the ndk-build as it should. So.. read up on AS / ndk integration
making changes as he specifies in order to KEEP your Android.mk and not to get shunted off to auto-gen'd make.
Include in your build gradle his stuff to indicate you are not using jni defaults.
Include the explicit step to run the ndk-build against your JNI folder.
See if u dont get a 'libmp3lame.so' in the apk...
Solution 2:
Thanks for your feedback. I finally got it to work. The key lies inside the 'build.gradle'-file.
In the 'defaultConfig'-section you have to tell Android studio that you want to link lame. Therefore, add
ndk{
moduleName "Lame"
ldLibs "log"
}
This did the trick for me :-).
Cheers,
Martin
Post a Comment for "How To Link The "lame" Mp3 Encoder Shared Object To An Android Studio Project"