Skip to content

Commit 0b2d85c

Browse files
committed
fix: correctly get device abi
1 parent f1b1269 commit 0b2d85c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/services/android/gradle-build-service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ export class GradleBuildService
3434
if(buildData.emulator) {
3535
devices = devices.filter(d=>d.isEmulator);
3636
}
37-
const abis = devices.map(d=>d.deviceInfo.abis[0]);
38-
if (abis.length > 0) {
37+
const abis = devices.map(d=>d.deviceInfo.abis.filter(a=>!!a && a.length)[0]).filter(a=>!!a);
38+
if (abis.length > 0 && buildTaskArgs.findIndex(b=>b.startsWith('-PabiFilters')) === -1) {
3939
buildTaskArgs.push(`-PabiFilters=${abis.join(',')}`);
4040
}
4141
}

0 commit comments

Comments
 (0)