Hi Xavier,

I tried your suggestion.

Project compile, assemble and get installed.
but the .so files are missing from the final apk file.

01-23 17:05:28.683  31464-31464/? E/JNIUtilsīš• The native library libQCAR.so
could not be loaded


I can see my compiled .so files in:

build/native-libs/

Does emptying srcDirs also skip the step of packaging native libs into the
APK or is something also changed in how the binary libraries are included
in the APK?

I suspect this is ignored:

tasks.withType(com.android.build.gradle.tasks.PackageApplication) { pkgTask
->
    pkgTask.jniFolders = new HashSet<File>()
    pkgTask.jniFolders.add(new File(projectDir, 'native-libs'))
}


because of me adding this:
sourceSets.main.jni.srcDirs = []

to the setting.

Am I right?

Currently for development I left android plugin 0.6 and gradle 1.8 in
files, Android Studio complains but let me do my stuff. I compile and
install from command line.

Thanks and sorry for my late response.

Regards,
Daniele



On Tue, Jan 21, 2014 at 10:38 AM, Xavier Hallade <[email protected]> wrote:

> Hi,
>
> In the current implementation the Android.mk is indeed ignored when the
> gradle NDK task is called.
> You can avoid the NDK task to be ran by setting this for example:
> sourceSets.main.jni.srcDirs = []
> and then you can call ndk-build on your project manually without any
> troubles.
>
>
> On Monday, January 20, 2014 10:56:06 AM UTC+1, Daniele Segato wrote:
>>
>> A correction:
>>
>> On Monday, January 20, 2014 10:53:56 AM UTC+1, Daniele Segato wrote:
>>>
>>> PROJECT_PATH is computed like this:
>>> PROJECT_PATH := $(abspath $(call my-dir)/../../../)
>>>
>>>
>>> The path is correct because it would complain about missing assimp.so
>>> otherwise.
>>>
>>
>> The path is correct if I execute ndk-build manually from the src/main
>> directory
>>
>>
>>
>  --
> 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 [email protected].
> 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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to