Enable Exception C++

后端 未结 8 784
醉梦人生
醉梦人生 2021-01-01 13:00

I am trying to make APP native code for Android. The Native code is in cplusplus. Whenever I try to make, the following error appears.

H236Plus.cpp:13

8条回答
  •  佛祖请我去吃肉
    2021-01-01 13:25

    Refer this answer by @Tundebabzy if you are using ndk-build build system.

    For CMake build system

    add the following to your module-level build.gradle file:

    android {
      ...
      defaultConfig {
        ...
        externalNativeBuild {
    
          // For ndk-build, instead use ndkBuild {}
          cmake {
            // Enables exception-handling support.
            cppFlags "-fexceptions"
          }
        }
      }
    }
    ...
    

    For more information See this Link.

提交回复
热议问题