Update gralde configure to only build the target abi. (#341)

* Update gralde configure to only build the target abi.

* Fix sync project error.
This commit is contained in:
Kevin Li
2020-04-28 18:32:29 +08:00
committed by GitHub
parent c77a49c15c
commit 4e878d614d

View File

@@ -58,7 +58,13 @@ ext.nativeBuild = { nativeTargets ->
if (abi != 'all') {
abiFilters abi.split(' ')
} else {
abiFilters "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
if (project.hasProperty('android.injected.invoked.from.ide') && project.hasProperty('android.injected.build.abi')) {
//Only build the target abi while running from Android studio
abi = project.getProperty("android.injected.build.abi")
abiFilters abi.split(',').first()
} else {
abiFilters "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
}
}
}
}