I'm gaining weight despite adopting a diet plan and exercise.

Track calories & exe. Track calories & exercise. Decrease total calories you consume and increase exercise to lose weight. Good app for tracking diet and exercise is "my fitness pal".