Can't compile project for Android Studio

Hello!

So I’m trying to compile my old project to support android studio (currently there is no android-studio folder in the project directory). So I set everything up. The SDK, NDK, also cleaned the obj local folder, and at one point I though that’s it, I got it, but unfortunately after 3-4mins of compilation I get this error:

At global scope:
cc1plus: warning: unrecognized command line option "-Wno-extern-c-compat"
cc1plus: warning: unrecognized command line option "-Wno-extern-c-compat"
make: *** [obj/local/x86/objs-debug/cocos2dx_internal_static/base/allocator/CCAllocatorDiagnostics.o] Error 1
At global scope:
cc1plus: warning: unrecognized command line option "-Wno-extern-c-compat"
cc1plus: warning: unrecognized command line option "-Wno-extern-c-compat"
make: *** [obj/local/x86/objs-debug/cocos2dx_internal_static/base/allocator/CCAllocatorGlobalNewDelete.o] Error 1
make: Leaving directory `/Users/lem/Downloads/games/android-games/proj.android'
Error running command, return code: 2.

I’m using this command:

cocos compile -p android --android-studio --app-abi x86

Can someone guide me what should I do in this case?

This as been covered a lot here on these forums. What does your Android.mk look like?