2

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.

Jon Goodwin
  • 9,053
  • 5
  • 35
  • 54
gesha
  • 79
  • 7

2 Answers2

2

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

Jon Goodwin
  • 9,053
  • 5
  • 35
  • 54
1

Check if you have a file called src/main/jni/Build.config available to make.

Make sure you are in the right directory when run ndk-build.

shizhen
  • 12,251
  • 9
  • 52
  • 88