Enable Exception C++

后端 未结 8 635
醉梦人生
醉梦人生 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:05

    with the latest version of Android Studio this is what my build.gradle looks like:

    model {
        android {
            compileSdkVersion 23
            buildToolsVersion "23.0.2"
    
            buildTypes {
                release {
                    minifyEnabled false
                    shrinkResources false
                    proguardFiles.add(file("proguard-rules.txt"))
                    signingConfig = $("android.signingConfigs.release")
                }
            }
    
            defaultConfig {
                applicationId "my.android.app"
                minSdkVersion.apiLevel 16
                targetSdkVersion.apiLevel 23
                versionCode 29
                versionName "my.latest.version"
            }
    
            ndk {
                moduleName "jni-utils"
                ldLibs.add("log")
                cppFlags.add("-std=c++11")
                cppFlags.add("-fexceptions")
                stl "gnustl_static"
            }
        }
        android.signingConfigs {
            create("release") {
                storeFile "C:\\Android\\Git\\MyProject\\keystore\\keystoreCommon"
                storePassword "put you password here"
                keyAlias "put your alias here"
                keyPassword "put your password here"
            }
        }
    }
    

提交回复
热议问题