Chosen Solution
My 2.4ghz macbook had the dreaded X intermittently appear in the battery icon in the upper right corner of the screen, and the dropdown would read “no batteries available.” This would be the case even with a good battery in the computer. If unplugged, the computer would often run for a minute or two before abruptly shutting down. Gradually, this went from an occasional occurrence to the status quo.
My research indicated that the battery connector should be replaced (and if you have this problem and my solution does not work for you, this is the path i’d take). I decided to take a long shot and reset the PRAM before ordering the battery connector. When i removed the battery, a tiny screw fell out. I looked, and the screw had somehow backed itself out from the second screw spot left of the battery connector on the interior wall. Getting it back in was a little tricky, because of the proximity to the screen closing magnet (a possible cause of the rogue screw?). I also gave all the other screws near the battery connector a tightening. Now that the screw is in its right place, the computer has been behaving perfectly. Thank you pollytintop for your help :).
I use a product called Threadlocker available at Ace Hardware to help keep screws in place. This might work for you if you find this screw backing out on you again.