First of all, if I read your question correctly - you're asking about renting an apartment WITH friends, not TO friends.
I don't see any issues in renting with friends (for example, lots of college grads find apartments w/ their college pals) as long as you set some ground rules before doing so.
You need to decide how things like food and visitors will be handled.....is smoking allowed?....who cleans up the shared rooms?........how the bills will be paid.........etc.
If the person is already your friend, then you should have a pretty good idea of what they're like - are they messy and you're a neat freak?
Are the party animals and you're a bookworm?
So - you're not going into this without some idea of who the other person is...and whether you might be compatible as roomies.
The more you can agree on beforehand, the better.
If one can't afford to rent a place on their own, then renting with a friend can be a good short term solution.
The one good thing about a lease is........after a year it is usually over..so if it isn't working out....you move!