If the Floating Action Button (FAB) seems to be at the wrong position on the screen, check the version number of the Android supporting library. There is a bug in version 24.2.0 and above and we need to revert to a lower SDK and support library version. Check out this post.
DialogFragment
When using getContext to get the fragment’s context, if the IDE tells you that the getContext call requires API version 23 and current minimum is set to 15, make sure that the import for DialogFragment is import android.support.v4.app.DialogFragment instead of import android.app.DialogFragment. The same applies to Fragment too.
Reset android studio
On Mac, do the following
1 2 3 4 5 |
cd ~/Library/ rm -rf Application\ Support/AndroidStudio2.2 rm -rf Caches/AndroidStudio2.2 rm -rf Logs/AndroidStudio2.2 rm -rf Preference/AndroidStudio2.2 |
Then restart android studio, re-install any plug-ins.