Search code examples
androidc++android-ndkjniwrapper

*** No rule to make target `src/main/jni/Build.config'. Stop


Since I downgraded my NDK version to 14-16 (because of no GCC support in newer versions), I am facing this error *** No rule to make target `src/main/jni/Build.config'. Stop

I can't understand why in the old versions of the NDK it says no such file or directory in Android.mk file this line src/main/jni/Build.config.


Solution

  • Here's a typical setup.

    I don't know what's in your src/main/jni/Build.config file, pretty sure it is not used or needed (please show it's contents).

    .../app/build.gradle:

            externalNativeBuild {
            ndkBuild {
                path 'src/main/jni/Android.mk'
            }//ndkBuild
        }//externalNativeBuild
    

    .../app/src/main/jni/Application.mk:

    #APP_ABI := armeabi armeabi-v7a x86 mips
    APP_ABI := armeabi-v7a
    APP_PLATFORM := android-19
    APP_STL := stlport_static
    #APP_OPTIM := debug
    

    .../app/src/main/jni/Android.mk:

    #=======================================================
        LOCAL_PATH := $(call my-dir) #only call it ONCE !
    #=======================================================
        include $(CLEAR_VARS)
        LOCAL_MODULE      := hello_world
        LOCAL_MULTILIB := 32
    
        LOCAL_SRC_FILES :=  hello_world.cpp
    
        include $(BUILD_SHARED_LIBRARY)
    #-------------------------------------------------------
    

    Links

    android-gcc-toolchain