Consider using CMake or ndk-build integration. For more information, go to
阿新 • • 發佈:2020-12-22
技術標籤:androidandroid studiocmake
錯誤提示
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.com/r/studio-ui/add-native-code.html
Alternatively, you can use the experimental plugin:
原因:
在 /app/src/main/ 下建立了 jni檔案,並建立了Android.mk檔案
檔案內容
LOCAL_CERTIFICATE := platform
LOCAL_CERTIFICATE := shared
make project 報錯
解決建議:在 build.gradle 中新增以下程式碼
android { ........ sourceSets { main { jni.srcDirs = [] } } }