apply plugin: 'com.android.library' android { compileSdkVersion 28 defaultConfig { externalNativeBuild { cmake { targets "crypto", "bz2", "ssl", "tls", "dmg2img" arguments "-DANDROID_PIE=ON" } } } externalNativeBuild { cmake { path "CMakeLists.txt" } } sourceSets { main { assets.srcDirs = ['src/main/assets'] } } }