I\'ve updated the SDK to the latest version (API 23) and the onAttach(Activity) method for fragment is deprecated. So instead of using that method, now I\'m usi
I have encountered the same problem. What I have done to resolve it:
Change the argument type of onAttach callback from Activity to Context. For unknown reason, this modification results in the fact that the method onAttach(Context) is not called anymore during the fragment lifecycle. As a consequence, my app was crashing since the code that was in onAttach method has never been executed.
Move the code that was in onAttach method to onCreate one since it gets still executed.
With this modification, the app turns to functionate as before. No additional import statements were required.