Thanks for reply.
So in your opinion, if our project highly depends on some 3rd party 
prebuild libraries.
Is it better that we just disable auto ndk-build call by
android{
    ...
    sourceSets.main.jni.srcDirs = [] //disable automatic ndk-build call
}  

And will static libraries link will be implemented in Gradle 1.11+ update 
?? 


Xavier Ducrohet於 2014年3月11日星期二UTC+8上午11時33分55秒寫道:
>
> I'm not sure. To be honest we haven't looked at support static lib yet.
>
> Also, the current NDK integration will most likely be replaced by 
> something based on the new c/cpp support in Gradle 1.11+
>
>
> On Mon, Mar 10, 2014 at 6:56 PM, Wu Chienkang 
> <[email protected]<javascript:>
> > wrote:
>
>> Here is some part of auto-generated Android.mk file with this build.gradle
>> LOCAL_CFLAGS := -I/home/my/include/path/src/main/include
>> LOCAL_LDLIBS := \
>>     -llog -L/home/my/link/path/src/main/libs -llmy3rdLib1 -llmy3rdLib2
>>
>> I dont know why I can't link these 3rd party libraries and I got 
>> undefined reference error as result.
>>
>> Wu Chienkang於 2014年3月11日星期二UTC+8上午9時29分28秒寫道:
>>
>>> Hi, I use the latest Android Studio 0.5.1 for project development.
>>> Here comes the question for NDK build problem.
>>>
>>> I put 3rd party native libraries(.a files) in /src/main/libs
>>> And related header files in /src/main/include
>>>
>>> My build.gradle look like this
>>>
>>> ndk {
>>>         File curDir = file('./')
>>>         curDir = file(curDir.absolutePath)
>>>         String linkOpt = "-L" + curDir.absolutePath+"/src/main/libs"
>>>         String incOpt = "-I" + curDir.absolutePath+"/src/main/include"
>>>
>>>         moduleName "VisualSearch_Okao"
>>>         cFlags incOpt
>>>         ldLibs "log " + linkOpt + " -lmy3rdLib1  -lmy3rdLib2" 
>>>
>>>         stl "stlport_static"
>>> }
>>>
>>> But this still can't work, did anyone knows how to link 3rd libraries by 
>>> build.gradle without key in 'ndk-build'  manually.
>>> 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 [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> 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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to