如何为Android NDK的gradle构建文件中指定NDK
1个回答
2016-08-07 · 百度知道合伙人官方认证企业
育知同创教育
1【专注:Python+人工智能|Java大数据|HTML5培训】 2【免费提供名师直播课堂、公开课及视频教程】 3【地址:北京市昌平区三旗百汇物美大卖场2层,微信公众号:yuzhitc】
向TA提问
关注
展开全部
apply plugin: 'com.android.model.application'
model{
android {
compileSdkVersion = 22
buildToolsVersion = "23.0.1"
defaultConfig.with {
applicationId = "com.kltz88.car.jnidemo"
minSdkVersion.apiLevel = 14
targetSdkVersion.apiLevel = 22
versionCode = 1
versionName = "1.0"
}
tasks.withType(JavaCompile) {
//指定编译JDK版本
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
}
}
android.ndk {
moduleName = "test"
ldLibs +="log"
abiFilters +="armeabi"
abiFilters +="armeabi-v7a"
abiFilters +="x86"
}
android.buildTypes {
release {
minifyEnabled = false
proguardFiles += file( 'proguard-rules.pro')
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.2.1'
}
model{
android {
compileSdkVersion = 22
buildToolsVersion = "23.0.1"
defaultConfig.with {
applicationId = "com.kltz88.car.jnidemo"
minSdkVersion.apiLevel = 14
targetSdkVersion.apiLevel = 22
versionCode = 1
versionName = "1.0"
}
tasks.withType(JavaCompile) {
//指定编译JDK版本
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
}
}
android.ndk {
moduleName = "test"
ldLibs +="log"
abiFilters +="armeabi"
abiFilters +="armeabi-v7a"
abiFilters +="x86"
}
android.buildTypes {
release {
minifyEnabled = false
proguardFiles += file( 'proguard-rules.pro')
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.2.1'
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询