最新消息: USBMI致力于为网友们分享Windows、安卓、IOS等主流手机系统相关的资讯以及评测、同时提供相关教程、应用、软件下载等服务。

Consider using CMake or ndk-build integration. For more information, go to

业界 admin 2浏览 0评论

错误提示

Error: Your project contains C++ files but it is not using a supported native build system.
Consider using CMake or ndk-build integration. For more information, go to:
 https://d.android/r/studio-ui/add-native-code.html
Alternatively, you can use the experimental plugin:
 https://developer.android/r/tools/experimental-plugin.html

原因:

在 /app/src/main/ 下创建了 jni文件,并创建了Android.mk文件

文件内容

LOCAL_CERTIFICATE := platform
LOCAL_CERTIFICATE := shared

make project  报错

 

解决建议:在 build.gradle 中添加以下代码

android {
  ........

      sourceSets {
        main {
            jni.srcDirs = []
        }
    }
}

 

错误提示

Error: Your project contains C++ files but it is not using a supported native build system.
Consider using CMake or ndk-build integration. For more information, go to:
 https://d.android/r/studio-ui/add-native-code.html
Alternatively, you can use the experimental plugin:
 https://developer.android/r/tools/experimental-plugin.html

原因:

在 /app/src/main/ 下创建了 jni文件,并创建了Android.mk文件

文件内容

LOCAL_CERTIFICATE := platform
LOCAL_CERTIFICATE := shared

make project  报错

 

解决建议:在 build.gradle 中添加以下代码

android {
  ........

      sourceSets {
        main {
            jni.srcDirs = []
        }
    }
}

 

发布评论

评论列表 (0)

  1. 暂无评论