Can they charge me with being an accomplice for retail theft even though I had no knowledge that the person I was with was going to steal?
Of course the prosecutor can charge you; the question is whether the prosecutor can prove the case against you.
From your description, I take it that you did not intend for or know at the beginning that your friend would steal. Let's assume that:
(1) You didn't have possession of the stolen property at any time;
(2) You didn't realize at some point that your frend was stealing.
Assuming those facts, the prosecutor can still argue that you are lying and actually helped your friend commit theft.
If either assumption 1 or 2 is incorrect, it may be very difficult to convince the judge or jury that you were not helping your friend commit the theft.