Skip to content

Commit 79d1987

Browse files
committed
Handle x64 arch on Apple M1.
1 parent 1a33fb8 commit 79d1987

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/commands/android/constants.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import inquirer from 'inquirer';
22
import path from 'path';
3+
import os from 'os';
34

45
import {AvailableOptions, SdkBinary} from './interfaces';
56

@@ -41,6 +42,11 @@ export const ABI = (() => {
4142
return 'x86';
4243
}
4344

45+
// Handle case when Apple M1's arch is switched to x64.
46+
if (arch === 'x64' && os.cpus()[0].model.includes('Apple')) {
47+
return 'arm64-v8a';
48+
}
49+
4450
return 'x86_64';
4551
})();
4652

0 commit comments

Comments
 (0)