大家好我的应用程序一切正常,直到昨天,我昨天更新了我的SDK,它开始给出错误,它首先给出了一个错误
No resource found at values v24 ….
像这样的一些东西我搜索并通过更改build.gradle中的以下行来解决它
compileSdkVersion 25 buildToolsVersion '25.0.2'
现在错误消失了,它在更高的Android版本7.1.1中运行完全正常
但是当我在较低版本的android中运行时,它会给出以下错误
E/AndroidRuntime: FATAL EXCEPTION: main Process: com.wowio.ebookreader,PID: 15469 java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.wowio.ebookreader/com.eminosoft.ebookread.activity.SplashScreenActivity}: java.lang.ClassNotFoundException: Didn't find class "com.eminosoft.ebookread.activity.SplashScreenActivity" on path: DexPathList[[zip file "/data/app/com.wowio.ebookreader-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.wowio.ebookreader-1,/vendor/lib,/system/lib]] at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2378) at android.app.ActivityThread.access$800(ActivityThread.java:155) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1244) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5433) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1268) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.ClassNotFoundException: Didn't find class "com.eminosoft.ebookread.activity.SplashScreenActivity" on path: DexPathList[[zip file "/data/app/com.wowio.ebookreader-1.apk"],/system/lib]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) at java.lang.ClassLoader.loadClass(ClassLoader.java:497) at java.lang.ClassLoader.loadClass(ClassLoader.java:457) at android.app.Instrumentation.newActivity(Instrumentation.java:1068) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2186) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2378) at android.app.ActivityThread.access$800(ActivityThread.java:155) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1244) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5433) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1268) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084) at dalvik.system.NativeStart.main(Native Method)
我已经尝试过以下事情
1.清洁项目
2.无效缓存/重启
3.删除设备上的应用程序
已经看过这些问题Question 1,Question 2没什么用了.我该如何解决这个问题?
如果你需要任何东西我会更新它的问题
我的build.gradle文件
apply plugin: 'com.android.application' android { compileSdkVersion 25 buildToolsVersion '25.0.2' defaultConfig { applicationId "com.wowio.ebookreader" minSdkVersion 14 targetSdkVersion 23 multiDexEnabled true } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'),'proguard-rules.txt' } } dexOptions { javaMaxHeapSize "4g" } } dependencies { compile 'com.android.support:appcompat-v7:+' compile 'com.google.android.gms:play-services:+' compile 'com.android.support:multidex:1.0.1' // the are many more dependencies i removed to decrease size }