2015-09-10 32 views

回答

0

我最終評論了ndk部分並添加了一個ndkBuild任務。

// The normal ndk build (commented out above) is broken because __system_property_get can't be resolved 
// by the linker. Doing the build via the ndk-build script is workaround. 
task ndkBuild(type: Exec) { 
def ndkDir = project.plugins.findPlugin('com.android.library').sdkHandler.getNdkFolder() 
commandLine "$ndkDir/ndk-build", '-C', 'src/main/jni', 
     "NDK_OUT=$buildDir/ndk/obj", 
     "NDK_APP_DST_DIR=$buildDir/../../../externalLibs" 
} 
assembleRelease.dependsOn ndkBuild 
assembleDebug.dependsOn ndkBuild