Android - getActionBar() returns null after upgrading to SDK 21
I was working on a new app in Android Studio Beta with target SDK 20. It was all well and good, but after updating target SDK version to 21 (and appcompat-v7 to 21.0.0) the app started crashing on launch.
Quick debugging revealed that the issue was cased by the line of code actionBar = getActionBar(); inside main activity onCreate method. getActionBar() was now returning NULL.
After some digging I resolved the issue by changing application theme from Theme.AppCompat to android:Theme.Holo. This will only work if your minimum SDK is 14 or higher, which was the case in this instance.
Read more: Android - getActionBar() returns null after upgrading to SDK 21