我已经实现了一个在marshmallow版本上成功运行的应用程序,但是当我在kitkat版本上运行时,它会显示异常,即java.lang.ClassNotFoundException。我不知道为什么这个例外即将到来我使用min sdk版本是16并且最大值是25请检查下面的图像
飞溅在Mainfest上
<activity
android:name="com.devbhoomimedia.maangal.SplashActivity"
android:label="Maangal.com"
android:theme="@style/AppTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
gradle文件
android {
compileSdkVersion 24
buildToolsVersion '26.0.2'
defaultConfig {
applicationId "com.devbhoomimedia.mgltest"
minSdkVersion 16
targetSdkVersion 24
versionCode 1
versionName "1.0"
multiDexEnabled true
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
sourceSets { main { assets.srcDirs = ['src/main/assets', 'src/main/assets/']
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:24.2.0'
compile 'com.android.support:design:24.2.0'
compile 'com.android.support:cardview-v7:24.2.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'com.mcxiaoke.volley:library-aar:1.0.0'
compile 'com.weiwangcn.betterspinner:library-material:1.1.0'
compile 'com.android.support:recyclerview-v7:24.2.0'
compile 'com.android.support:support-v4:24.2.0'
compile project(path: ':library')
compile 'com.google.android.gms:play-services-appindexing:8.1.0'
compile 'com.android.support:recyclerview-v7:24.1.0'
compile project(':library_spinner')
}
答案 0 :(得分:1)
从gradle文件中删除multiDexEnabled = true