I have checked here and here, but neither solves my problem. I am extending ActionBarActivity
after adding v7 appcompat successfully through Gradle.
The issue is that when my Activity extends Activity
it works fine. However when I extend
ActionBarActivity
it crashes with
java.lang.NoClassDefFoundError: com.bignerdranch.android.criminalintent.TestActivity
Here is my activity in manifest:
<activity
android:name=".TestActivity"
android:label="@string/app_name"
android:theme="@style/Theme.AppCompat.Light">
</activity>
Here is my build.gradle:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.6.+'
}
}
apply plugin: 'android'
repositories {
mavenCentral()
}
dependencies {
compile 'com.android.support:support-v4:18.0.+'
compile 'com.android.support:appcompat-v7:18.0.+'
}
android {
compileSdkVersion 18
buildToolsVersion "18.0.1"
defaultConfig {
minSdkVersion 8
targetSdkVersion 18
}
}