Build failed in Android Studio with simulator

I recently upgraded to latest SDK`s. Now I am able to build and debug from Xcode with simulator or real device, build and debug from AS when I use real device, but build from AS fails when I use simulator. Some error details is in the next lines:

ld: warning: directory not found for option '-F/Users/andrii/dev/mobile-app/StayFit/ios/xcode/Pods/FirebaseCore/Frameworks' ld: can't open -sectcreate file: /Users/andrii/dev/mobile-app/StayFit/ios/xcode/..//build/moe/main/xcode/Debug-iphonesimulator/arm64.oat clang: error: linker command failed with exit code 1 (use -v to see invocation)

Full log is in attached file
XcodeBuild-main-debug-iphonesimulator.log (75.2 KB)

I use MOE plugin 1.7.1, AS 4.0.1, Xcode 12.0, Graddle 4.0.1

There is no Debug-iphonesimulator/arm64.oat file. Can it be related?
Screen Shot 2020-09-23 at 5.30.03 PM

Interesting… It’ll take a look soon.

1 Like

Can you try the solution mentioned here?

adding “arm64” to Project -> Build Settings -> Excluded Architecture for varients.

Screen Shot 2020-09-26 at 12.53.44 am

1 Like

Currently MOE generates oat files for i386 and x86_64 when targeting simulators. I can make it so it also generates oat files for arm64 as well, however I don’t know if it’s worth doing that. This seems to target the new arm-based macs and I don’t think this is really a valid use case anytime soon (and generating one more oat file means further slowing down the build).

The i386 arch is not used as well since I don’t think there is anyone out there that is still using a x86-only mac, so there is also no point of generating an i386 oat file. I’ll remove that in the next release so the build time can be reduced.

2 Likes

Many thanks!

Excluding arm64 helped.
BTW. Weird why arm64 is needed. I am using old 2012 Mac Mini. Maybe it`s related to new Apple build components or something like that.

I think Apple is preparing for the transition to arm-based Mac, on which the simulator runs uses arm64 architecture. It’s not something I could worry about since I don’t have one :stuck_out_tongue:

1 Like

Looks like this is what they are doing en.wikipedia.org/wiki/Mac_transition_to_Apple_Silicon