Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
302 views
in Technique[技术] by (71.8m points)

java - Android studio Build failed with NDK

found error while build the project with NDK

error

More than one file was found with OS independent path 'lib/armeabi-v7a/libmxecg.so'. If you are using jniLibs and CMake IMPORTED targets, see https://developer.android.com/studio/preview/features#automatic_packaging_of_prebuilt_dependencies_used_by_cmake

apply plugin: 'com.android.library'

android {
compileSdkVersion config.compileSdk

defaultConfig {
    minSdkVersion config.minSdk
    targetSdkVersion config.targetSdk
    versionCode config.versionCode
    versionName config.versionName
}

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

sourceSets {
    main {
        // let gradle pack the shared library into apk
        jniLibs.srcDirs = ['libs/libmxecg/lib']

    }
}

externalNativeBuild {
    cmake {
        path "CMakeLists.txt"
    }
}

}

enter image description here

In another module i also use Cmake and it works fine when i add another module with Cmake it shows error.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...