I’ll introduce how to clear the source file cache when building for Android or iOS in the Ionic Framework.
As I progressed with implementation, at some point ionic cordova build ios
would only show BUILD FAILED messages and builds would consistently fail.
BUILD FAILED Message (partial excerpt)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocat
ion)
** BUILD FAILED **
The following build commands failed:
Ld build/emulator/my.app/my-app normal x86_64
(1 failure)
xxx
Even after doing git checkout
to a commit that definitely built successfully before and running ionic cordova build ios
, the build continued to fail.
ionic cordova platform remove ios
ionic cordova platform add ios
Then, when I tried ionic cordova build ios
again,
** BUILD SUCCEEDED **
This message was displayed and I was able to build successfully.
For Android as well,
ionic cordova platform remove android
ionic cordova platform add android
This should clear the build cache. (Operation not verified)
That’s all from the Gemba where I was troubled by source file cache during Ionic builds.