I have an Android Studio project that is working fine on devices with Android build version Lollipop but is throwing an exception when trying to run it on a device with andr
The main issue is that your compileSdkVersion does not match major version of support libraries you include with the project. Follow these rules:
Set targetSdkVersion to 22 because you want to use Lollipop features on Lollipop devices (and don't care about Marshmallow for now).
Set compileSdkVersion to 23 because it's the newest.
Set buildToolsVersion to "23.0.1" because it's the newest.
Set support library versions to the latest matching compileSdkVersion:
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.android.support:support-v4:23.1.0'
compile 'com.android.support:recyclerview-v7:23.1.0'
compile 'com.android.support:cardview-v7:23.1.0'