Did they only put a wall on one side of the river?
Did both sides get their own walls?
Were there any attempts to make fortified bridges part of the wall and just build one?
Did they usually build them far enough away from the river that it wouldn't wash out its foundations, or did they have a solution for that?
I know in China the general ideas behind city wall placement was to have one (or two) sides built along a river, then create a moat extending out from the river to cover the other sides. In the case of large metropolises, a second smaller walled city is sometimes built opposite on the other bank. During sieges outlying farmers would retreat inside the walled city, which is stocked with supplies to last for years. The idea behind having one side of the wall to the river was so that supplies can be received during a siege.
https://en.wikipedia.org/wiki/Battle_of_Xiangyang
The Siege of Xiangyang, for example, lasted 5-6 years. This was with little to no supplies being shipped into the city since no field army could contest the Mongolians' land blockade and a large fleet was built to keep the river blockaded as well. In this case, both sides of the river did get walls: Fancheng in the north and Xiangyang proper in the south. Having a city on the river does have disadvantages.
For a great example, we can use Fancheng, located directly right north of Xiangyang across the river. In the Battle of Fancheng, the city was flooded by a series of heavy rains, causing desertion and an overall desperate situation. Also during the Three Kingdoms Era, the Battle of Xiapi concluded with the besiegers redirecting the rivers adjacent to Xiapi's walls to flood the city, demoralizing the soldiers within and leading to defection. These are not the first or last examples of walled cities on rivers having trouble with flooding.
You can still see the remains of these moats outlining where walls used to be in some Qing dynasty or older Chinese cities. For example here is XiangYang's moat clearly visible on google maps! It's the square extending out south from the Hanshui river.
Here's some more examples:
Pingyao: the walls still exist! The canal/moat connects to the river on the northeast corner of the walled city.
A different style of wall placement to counteract the dangers of flooding rivers is to have the walled city further away from the main river. This style still necessitated creating a canal extending out from the river which surrounds the wall as a moat. You can see this design most clearly in Nanjing Here is a clearer map that outlines the wall
I think a fairly good example to start from would the famed city of Konstantiniyye, also called Istanbul (not Constantinople). As a city built on both a major river and cultural crossroads from east to west, Constantinople was under constant threat from one group or another, pretty much up until it was conquered by Mehmet II in 1453AD. As such, its defenses had been built up over the years to the point of being practically impervious to any major post-Byzantine threats.
This is a relatively accurate representation of the state of the city under Byzantine rule, circa 1400. As you can see, the majority of the city occupied the southern paeninsula that bordered the Golden Horn. While the smaller Genoese colony of Galata on the northern portion of the Golden Horn was not as massive as Constantinople proper, it was absolutely critical to the defense of the city in case of invasion by sea.
While it's difficult to pinpoint exactly when it was built (at least as early as the crusader invasion of 1204), the Great Chain that spanned the length of the Golden Horn as a barrier to the Bosporous was an iconic and central part of the defense of the river nation of Constantinople. By cutting off passage through the river between the two portions of the city, any invading army would be forced to either attempt a land invasion against the great walls of Constantinople or try to find a way to break the chain. This was a daring prospect, and only the invasion during the 4th Crusade and Mehmet II's conquests were able to ever successfully conquer the city's defenses.
More to your questions, you can see that both Galata and Constantinople proper had their own walls, which prevented an easy siege by land. Constantinople actually had walls that entirely surrounded each portion of the city, even up against the river, albeit with a few breaks and bays to allow for transit and trade. They were built fairly close to shore, but were thick enough that they weren't severely compromised by the occasional flood. I'd say the Great Chain is more creative example of a "wall" to unite both portions of the city, and it seems they were somewhat commonly used throughout the middle ages as metalworking and industry grew more advanced and more enormous pieces of metal could be shaped to form a chain massive enough to blockade an entire river.
While I am by no means an expert, and this is only an example of one city, it provides a fair framework as to understanding how medieval river cities defended themselves in the case of siege. If you want do some easy research on your own time, looking at medieval-era maps of major cities that throughout Europe that include the walls should give you a good idea of how the defenses of most cities were designed.
One common misconception is that cities in the age of fortification had the entire city surrounded by walls. Often this was not the case as even once a wall was built it often didn't prevent development outside the walls proper, as the value of property inside the walls would be more desirable and expensive, lower end development would proceed outside the walls usually with limitation as to preserve the approach to the walls for visibility. Also like modern cities per-modern cities would absorb the smaller townships that would develop around them. This was actually a best case scenario, as towns and cities existed legally in most of Europe by charters which granted them their sovereign rights. So some towns across rivers would probably want to see their settlement absorbed because their dwellings then may gain legality and rights such as that of fortification.
Some fantastic answers in here. Can anyone do London? I'd be really interested in seeing how it's evolved.