Never mind...I answered my own question. It works exactly as advertised. Thanks for the help!
From: "Roberto R. Garcia" <robe...@dealerhq.com<mailto:robe...@dealerhq.com>> Reply-To: "adt-dev@googlegroups.com<mailto:adt-dev@googlegroups.com>" <adt-dev@googlegroups.com<mailto:adt-dev@googlegroups.com>> Date: Thursday, March 6, 2014 at 10:42 AM To: "adt-dev@googlegroups.com<mailto:adt-dev@googlegroups.com>" <adt-dev@googlegroups.com<mailto:adt-dev@googlegroups.com>> Subject: Re: New way to hack ndk so libs copy when using gradle plugin 0.4.0+ Thanks! Do I need the NDK even for this simple case? If this is the case, then this may be my issue. From: Xavier Ducrohet <x...@android.com<mailto:x...@android.com>> Reply-To: "adt-dev@googlegroups.com<mailto:adt-dev@googlegroups.com>" <adt-dev@googlegroups.com<mailto:adt-dev@googlegroups.com>> Date: Thursday, March 6, 2014 at 10:40 AM To: "adt-dev@googlegroups.com<mailto:adt-dev@googlegroups.com>" <adt-dev@googlegroups.com<mailto:adt-dev@googlegroups.com>> Subject: Re: New way to hack ndk so libs copy when using gradle plugin 0.4.0+ src/main/jniLibs should be enough but the .so files in there should be in sub folder named after the device ABIs. For example: src/main/jniLibs/armeabi-v7a/libfoo.so src/main/jniLibs/x86/libfoo.so src/main/jniLibs/mips/libfoo.so You shouldn't need to change your build.gradle unless you relocate src/main/jniLibs or you want to select only some ABI for multi-apks. You can look at the output with unzip -l foo.apk. If you should show the content of your zip which should contain: lib/armeabi-v7a/libfoo.so lib/x86/libfoo.so lib/mips/libfoo.so On Thu, Mar 6, 2014 at 8:22 AM, Roberto Garcia <robe...@dealerhq.com<mailto:robe...@dealerhq.com>> wrote: I have a set of pre-build JniLibs and I have copied it into my src/main/jniLibs. I am still not seeing the integration into my final APKs. When I hand copy the .so files into the build directory per the previous work-around, there is a marked difference in size and my app functions properly. This does not occur automatically. My questions are as follows: 1. If I have a set of pre-build .so libraries, is it enough to simply drop them into my project structure as you have instructed? 2. Are there any changes to my build.gradle file? 3. What markers should I expect in the build directory to indicate that the integration is functioning properly? Should I see a new directory called "native-libs" or is the integration more opaque now? I believe that my use-case is the simplest of them all, so I am hoping that it will be obvious to someone out there. Thanks! Best Roberto On Thursday, January 23, 2014 10:46:06 PM UTC-6, Chris Byers wrote: Thanks Xavier for a great implementation, looks like NDK support is heading in the right direction! I used your examples to compile an NDK library I have with no issues. However, one feature request, when you can, is to either allow me to override (or merge) the Android.mk file with my own so that I can fully customize the NDK build, or provide additional library/path linking options. I need to add "-Wl,-whole-archive path/to/static/lib -wl,-no-whole-archive" to my NDK library as well as link a prebuilt .so library against my NDK library. I have a custom built arm library for Python (libpython.so) that my NDK code requires linking against, but I don't see an "easy" way to provide a path (-L) for it. As a work around, I am tagging on to the end of the first ldLibs entry as such in the mean time: ldLibs "log -lpython -L/Users/my_build/libs/ -wl,-no-whole-archive /Users/my_build/libs/libxml2.a" I love Android Studio and look forward to full NDK support, thanks for the hard work, it's working quite well already! On Thursday, December 26, 2013 7:39:45 PM UTC-6, Xavier Ducrohet wrote: Version 0.7.2 was published on MavenCentral. You can put your prebuilts in src/main/jniLibs/... There's a sample called ndkJniLib that shows the expected folder structure in there. -- Xavier Ducrohet Android SDK Tech Lead Google Inc. http://developer.android.com | http://tools.android.com Please do not send me questions directly. Thanks! -- You received this message because you are subscribed to the Google Groups "adt-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to adt-dev+unsubscr...@googlegroups.com<mailto:adt-dev+unsubscr...@googlegroups.com>. For more options, visit https://groups.google.com/groups/opt_out. -- Xavier Ducrohet Android SDK Tech Lead Google Inc. http://developer.android.com | http://tools.android.com Please do not send me questions directly. Thanks! -- You received this message because you are subscribed to a topic in the Google Groups "adt-dev" group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/adt-dev/nQobKd2Gl_8/unsubscribe. To unsubscribe from this group and all its topics, send an email to adt-dev+unsubscr...@googlegroups.com<mailto:adt-dev+unsubscr...@googlegroups.com>. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to a topic in the Google Groups "adt-dev" group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/adt-dev/nQobKd2Gl_8/unsubscribe. To unsubscribe from this group and all its topics, send an email to adt-dev+unsubscr...@googlegroups.com<mailto:adt-dev+unsubscr...@googlegroups.com>. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups "adt-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to adt-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.