There are some steps that you can take to prevent wall cracks such as:
Using good quality elastomeric paint* (e.g. Nippon Paint 3-in-1 Medifresh)
Letting paint dry completely before layering on another coat
Re-painting your walls regularly
Facilitating cross-ventilation in your home
*Elastomeric paint is able to stretch and cover minor hairline cracks so they won’t appear so quickly.