The long term is to move away from makefile alltogether and base our work
on the c/c++ plugin for Gradle.

There are some severe limitations to the NDK support right now. I need to
document them but haven't had a chance yet.

We should support subfolders in jni/ though.


On Thu, Jan 9, 2014 at 3:24 PM, Johan Bilien <[email protected]> wrote:

> Hi,
>
> I'm trying to port our JNI/NDK library to gradle at:
>
> https://github.com/jobi/android-leveldb/tree/gradle
>
>
> The NDK compilation fails, because some of our C++ files depend on headers
> that are in subfolders of the jni/ folder:
>
>  What went wrong:
> Execution failed for task ':compileDebugNdk'.
> > com.android.ide.common.internal.LoggedErrorException: Failed to run
> command:
>   /Users/jobi/android-ndk-r9c/ndk-build NDK_PROJECT_PATH=null
> APP_BUILD_SCRIPT=/Users/jobi/src/android-leveldb/build/ndk/debug/Android.mk
> APP_PLATFORM=android-19
> NDK_OUT=/Users/jobi/src/android-leveldb/build/ndk/debug/obj
> NDK_LIBS_OUT=/Users/jobi/src/android-leveldb/build/bundles/debug/jni
> APP_ABI=all
>   Error Code:
>   2
>   Output:
>   In file included from
> /Users/jobi/src/android-leveldb/src/main/jni/com_litl_leveldb_DB.cc:8:0:
>   /Users/jobi/src/android-leveldb/src/main/jni/leveldbjni.h:6:28: fatal
> error: leveldb/status.h: No such file or directory
>   compilation terminated.
>   make: ***
> [/Users/jobi/src/android-leveldb/build/ndk/debug/obj/local/armeabi-v7a/objs/leveldbjni//Users/jobi/src/android-leveldb/src/main/jni/com_litl_leveldb_DB.o]
> Error 1
>
>
>
> Is there a way to add folders to the LOCAL_C_INCLUDES? By default it seems
> only the jni/ folder is included.
>
>
> More generally, why is the gradle plugin generating its own Android.mk
> Makefile, instead of using the one that comes with the project? It seems to
> me this would be a lot more flexible.
>
> 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/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 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