Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Rifqi Fahmi
23,164 PointsThe addToBackStack() now support on Fragment (android.app) !
When i follow this video I try not to change the package and still use the Fragment from android.app and it work fine. I use android studio 2.1.2
Is the problem already fixed by android Ben Deitch ? If yes just reminder here hehe

Simon Coates
28,693 Pointsandroid extended AppCompatActivity by default for me, so I swapped in Activity and made some trivial code changes to confirm to myself that code I was viewing was fresh. Back button seemed to work in either case. So unless there's further information, the gotcha doesn't seem to apply.
3 Answers

Rohan Tilekar
134 PointsYes, adding fragmentTransaction.addToBackStack(null) worked for me perfectly. there should be a update in this video.

aldoolivares
14,478 PointsRifqi Fahmi oh ok thanks

aldoolivares
14,478 PointsI am using Android Studio 2.2 RC 2 and addBackStack() works just fine.

aldoolivares
14,478 PointsBen Deitch Ben Jakuben addToBackStack seems to be working fine now. Shouldnt there be a teacher's notes about this?

Rifqi Fahmi
23,164 PointsI think u should follow the instruction to use the android.support in order to follow the video because u will find some method in the video are not exist if you use the android.app
Daniel Bowen
8,127 PointsDaniel Bowen
8,127 PointsThis is true for me as well. I believe there definitely should be a teacher's notes change for this course.