想要包含android ndk的模块

时间:2018-05-24 11:24:39

标签: android gradle android-ndk

我正在尝试在我的项目中构建liblame模块。但问题是这个模块hase eclips maven buid设置。所以需要gradle迁移。

在结构中

有Android.mk

LOCAL_PATH := $(call my-dir)


include $(call all-subdir-makefiles)

有Application.mk

APP_ABI := armeabi armeabi-v7a
APP_MODULES := lame

my build gradle sett:

android {
    compileSdkVersion 26
    buildToolsVersion "27.0.3"

    defaultConfig {
        minSdkVersion 7
        targetSdkVersion 7

        versionCode 1
        versionName "1.0"

    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }

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


}

Bu build失败了:

enter image description here

   Error while executing process D:\AndroidTools\sdk\ndk-bundle\ndk-build.cmd with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=D:\SergeyB\36 LAME_MP3_PCM\Lame4Android-master\liblamemaster\src\main\jni\Android.mk NDK_APPLICATION_MK=D:\SergeyB\36 LAME_MP3_PCM\Lame4Android-master\liblamemaster\src\main\jni\Application.mk APP_ABI=armeabi-v7a NDK_ALL_ABIS=armeabi-v7a NDK_DEBUG=1 APP_PLATFORM=android-14 NDK_OUT=D:/SergeyB/36 LAME_MP3_PCM/Lame4Android-master/liblamemaster/build/intermediates/ndkBuild/debug/obj NDK_LIBS_OUT=D:\SergeyB\36 LAME_MP3_PCM\Lame4Android-master\liblamemaster\build\intermediates\ndkBuild\debug\lib APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B -n}


process_begin: CreateProcess(NULL, "", ...) failed.


D:\SergeyB\36: No such file or directory
Open File


LAME_MP3_PCM\Lame4Android-master\liblamemaster\src\main\jni\Application.mk: No such file or directory
Open File


Android NDK: Your APP_BUILD_SCRIPT points to an unknown file: D:\SergeyB\36 LAME_MP3_PCM\Lame4Android-master\liblamemaster\src\main\jni\Android.mk    


*** Android NDK: Aborting...    .  Stop.
Open File


Build command failed.

如何解决它。

0 个答案:

没有答案