Android NDK: Are you sure your NDK_MODULE_PATH variable is properly defined?

Viewed 1545

recently (3 days ago) started learning Android Studio. I bought an Eclipse game project to play with, but I am getting errors. And when I fix that error, I get a new error. The current error is as following:

Build command failed. Error while executing process C:\Users\user\AppData\Local\Android\Sdk\ndk-bundle\ndk-build.cmd with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=C:\APPS\app\src\main\jni\Android.mk NDK_APPLICATION_MK=C:\APPS\app\src\main\jni\Application.mk APP_ABI=armeabi NDK_ALL_ABIS=armeabi NDK_DEBUG=0 APP_PLATFORM=android-15 NDK_OUT=C:/APPS/app/build/intermediates/ndkBuild/release/obj NDK_LIBS_OUT=C:\APPS\app\build\intermediates\ndkBuild\release\lib APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B -n} Android NDK: C:\APPS\app\src\main\jni\Android.mk: Cannot find module with tag 'box2D' in import path Android NDK: Are you sure your NDK_MODULE_PATH variable is properly defined ? Android NDK: The following directories were searched: Android NDK:
process_begin: CreateProcess(NULL, "", ...) failed.

I have googled and I saw a few other people had asked this question on this forum, but I didn't understand how to fix it (again, I'm a complete beginner)

Here's my build.gradle (Module: app):

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    buildToolsVersion "26.0.1"

    defaultConfig {
        applicationId "com.getemplate.catadventure"
        minSdkVersion 15
        targetSdkVersion 26

        ndk {
            moduleName "player_shared"
        }
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
    externalNativeBuild {
        ndkBuild {
            path 'src/main/jni/Android.mk'
        }
    }
}

dependencies {
    compile 'com.google.android.gms:play-services:+'
    compile files('libs/dagger-1.2.2.jar')
    compile files('libs/javax.inject-1.jar')
    compile files('libs/nineoldandroids-2.4.0.jar')
    compile files('libs/support-v4-19.0.1.jar')
}

And here is my Android.mk file:

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE := player_shared

LOCAL_MODULE_FILENAME := libplayer

LOCAL_SRC_FILES := main.cpp 

LOCAL_WHOLE_STATIC_LIBRARIES :=  core_static cocos2dx_static box2d_static

GOOGLE_PLAY_STORE := true

include $(BUILD_SHARED_LIBRARY)

$(call import-module, box2D) 
$(call import-module, core)
$(call import-module, cocos2dx)
$(call import-module,android-ndk-profiler/jni)

Thanks in advance.

0 Answers
Related