Set "$USE_DEPRECATED_NDK=true" in gradle.properties to continue using the current NDK integration. 解决办法

1、将 jni 文件夹名改为 cpp;

2、添加 CMakeLists.txt;

3、修改 build.gradle;

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

【参考】

https://developer.android.com/studio/projects/add-native-code.html

原文地址:https://www.cnblogs.com/renzimu/p/5926531.html