I am trying to get the sample camera app, called Camera2Basic, that was released with API 21 to compile on my 4.0.3 (API 15) test phone. It's located at http://developer.android.com/samples/Camera2Basic/project.html. I imported the project and have changed the code in build.gradle to
defaultConfig {
minSdkVersion 15
targetSdkVersion 21
}
I'm getting a lot of errors, the first being:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.android.camera2basic/com.example.android.camera2basic.CameraActivity}: android.view.InflateException: Binary XML file line #30: Error inflating class com.android.internal.widget.ActionBarView
I have tried researching the errors independently but I feel I'm missing something important. Any recommendations?
Edit: I also have added the dependency for the support library to build.gradle:
dependencies {
compile "com.android.support:support-v4:21.0.+"
}