2014年9月23日 星期二

zbar in android studio


 https://github.com/dm77/ZBarScanner/tree/master/ZBarScannerLibrary
https://github.com/ZBar/ZBar/tree/master/android
https://groups.google.com/forum/#!msg/adt-dev/nQobKd2Gl_8/ctDp9viWaxoJ
http://stackoverflow.com/questions/17340240/jni-folder-in-android-studio/22488155#22488155
http://stackoverflow.com/questions/16952388/android-studio-zbar

Did anyone of you noticed that this process include the .so files twice into the final apk? I recently switched to Android Studio and started using Gradle to build my Android project and I've got a weird behavior. Basically, I have a lib in app/src/main/jniLibs, divided in two folders: armeabi and armeabi-7va. The problem is that since I use Gradle, the APK file is twice more heavier. The reason is that Gradle copy the *.so files twice in the APK at two different locations: - lib/ - main/jniLibs/ When I used to build using Eclipse, everything was fine, *.so files were copied only one time. Does anyone know if there is a way to avoid this behavior? Is this a bug in Gradle or am I doing something wrong?

沒有留言:

張貼留言