我将minSDKVersion从19更新为21.当我尝试运行我的应用程序时,它现在崩溃了。我得到“Java.lang.ClassNotFoundException:Didnt find class android.support.v4.widget.DrawerLayout”任何想法如何解决这个问题?
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.id"
minSdkVersion 21
targetSdkVersion 21
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}
repositories {
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:support-v4:19.1.0'
}
答案 0 :(得分:0)
您已通过项目更改更新了您的sdk:import android.support.v7.app.ActionBarDrawerToggle;删除import android.support.v4.app.ActionBarDrawerToggle;