How to compile for x86_64 or x86 in android studio?

So I can’t run my game in an emulator because the emulators are using the x86 architecture. I tried installing an emulator with the armeabi architecture but the emulator wouldn’t run on my laptop.

Can I compile in Android Studio for x86_64? I tried changing APP_ABI := armeabi to APP_ABI := x86_64 in Application.mk but the game still compiled in armeabi. Is there anyway to force x86_64?

Yes, you can. Not sure if x86_64 works, but compiling it with x86 works for my emulator. Just open the gradle.properties file inside your proj.android-studio folder and add x86 to PROP_APP_ABI, separated with a colon like this:

PROP_APP_ABI=armeabi:x86

2 Likes

Works like a charm, thanks!

1 Like