I had this problem today - I found a fix to solve it
1) Open up your control panel
2) Open "Programs"
3) Open "Program and functions"
4) Find the program "microsoft visual c ++ 2017 x64"
5) Left click - then EDIT
6) Press repair
Now restart your computer - and it will work.
This solved my problem though.
I had the same problem. The fix for me was to go into my task manager and close all instances of apex legends and origins in both the processes tab and the details tab. Hope this helps!