You should check the starter and alternator.
Alternator is weak and needs replacing. Drive belt on alternator can also be slipping due to being loose. Check the alternator output at the battery with the engine running. It should read from 13.5-16 volts DC. Any less and it needs replacing.
check your alternator belt,and your pulleys ,
did you check your battery and alternator?
Is the battery dead? Check for 12v on the main alternator cable. If no power, check for burned out fusible links between alternator and battery. You may need a wiring diagram to check further.
The charging warning light should automatically reset if the battery is disconnected. Check the battery cables and ensure they are properly connected. Also check the alternator connections. If the light is still on there may be a problem with the new alternator.
You can find a 97 Nissan Altima alternator schematic diagram in the vehicle's owner's manual. You can also check local auto part stores.
Get your alternator tested at autozone,its free,and check your battery too.
check your thermostat to see if its opening.
Check to see if any wire connectors came loose to the alternator ground or leads, Check to see if you have correct tension on your belt.
The battery light is for low alternator output voltage. Try testing the alternator output using a miltimeter and if its less than 13 volts your alternator isn't putting out what it should. If it has low output check the belt tension and all wire connections before replacing alternator
You possibly have a loose alternator belt or the alternator is weak. Check the voltage at the battery with the engine running. It should be 13.5 ? 16 volts. Any less and the alternator is weak and needs replacing. Also make sure the connections at the battery are clean and tight.