您有没有遇到过绝望?(睡一觉起来,代码跑不了了)

  • 把这个报错写在前面,可以让别人检索到----
  • 解决的办法:删除gradle的本地缓存
  • java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/graphics/drawable/VectorDrawableCompat;
07-26 10:00:41.017 26955-26955/? E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.lms.ledtool, PID: 26955
    java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/graphics/drawable/VectorDrawableCompat;
        at android.support.v7.widget.AppCompatDrawableManager.isVectorDrawable(AppCompatDrawableManager.java:762)
        at android.support.v7.widget.AppCompatDrawableManager.checkVectorDrawableSetup(AppCompatDrawableManager.java:754)
        at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:196)
        at android.support.v7.widget.TintTypedArray.getDrawableIfKnown(TintTypedArray.java:86)
        at android.support.v7.app.AppCompatDelegateImpl.(AppCompatDelegateImpl.java:260)
        at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:182)
        at android.support.v7.app.AppCompatActivity.getDelegate(AppCompatActivity.java:520)
        at android.support.v7.app.AppCompatActivity.onCreate(AppCompatActivity.java:71)
        at com.lsm.base.ui.QMUIActivity.onCreate(QMUIActivity.java:93)
        at com.lms.ledtool.base.BaseActivity.onCreate(BaseActivity.java:70)
        at com.lms.ledtool.ui.SplashActivity.onCreate(SplashActivity.java:37)
        at android.app.Activity.performCreate(Activity.java:7436)
        at android.app.Activity.performCreate(Activity.java:7426)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1286)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3279)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3484)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:86)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2123)
        at android.os.Handler.dispatchMessage(Handler.java:109)
        at android.os.Looper.loop(Looper.java:207)
        at android.app.ActivityThread.main(ActivityThread.java:7470)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:958)
07-26 10:00:41.018 26955-26955/? E/AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.graphics.drawable.VectorDrawableCompat" on path: DexPathList[[zip file "/data/app/com.lms.ledtool-fqNRAR4tpWe--GDDOnD8pw==/base.apk", zip file "/data/app/com.lms.ledtool-fqNRAR4tpWe--GDDOnD8pw==/split_lib_dependencies_apk.apk", zip file "/data/app/com.lms.ledtool-fqNRAR4tpWe--GDDOnD8pw==/split_lib_resources_apk.apk", zip file "/data/app/com.lms.ledtool-fqNRAR4tpWe--GDDOnD8pw==/split_lib_slice_0_apk.apk", zip file "/data/app/com.lms.ledtool-fqNRAR4tpWe--GDDOnD8pw==/split_lib_slice_1_apk.apk", zip file "/data/app/com.lms.ledtool-fqNRAR4tpWe--GDDOnD8pw==/split_lib_slice_2_apk.apk", zip file "/data/app/com.lms.ledtool-fqNRAR4tpWe--GDDOnD8pw==/split_lib_slice_3_apk.apk", zip file "/data/app/com.lms.ledtool-fqNRAR4tpWe--GDDOnD8pw==/split_lib_slice_4_apk.apk", zip file "/data/app/com.lms.ledtool-fqNRAR4tpWe--GDDOnD8pw==/split_lib_slice_5_apk.apk", zip file "/data/app/com.lms.ledtool-fqNRAR4tpWe--GDDOnD8pw==/split_lib_slice_6_apk.apk", zip file "/data/app/com.lms.ledtool-fqNRAR4tpWe--GDDOnD8pw==/split_lib_slice_7_apk.apk", zip file "/data/app/com.lms.ledtool-fqNRAR4tpWe--GDDOnD8pw==/split_lib_slice_8_apk.apk", zip file "/data/app/com.lms.ledtool-fqNRAR4tpWe--GDDOnD8pw==/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.lms.ledtool-fqNRAR4tpWe--GDDOnD8pw==/lib/arm64, /data/app/com.lms.ledtool-fqNRAR4tpWe--GDDOnD8pw==/base.apk!/lib/arm64-v8a, /data/app/com.lms.ledtool-fqNRAR4tpWe--GDDOnD8pw==/split_lib_dependencies_apk.apk!/lib/arm64-v8a, /data/app/com.lms.ledtool-fqNRAR4tpWe--GDDOnD8pw==/split_lib_resources_apk.apk!/lib/arm64-v8a, /data/app/com.lms.ledtool-fqNRAR4tpWe--GDDOnD8pw==/split_lib_slice_0_apk.apk!/lib/arm64-v8a, /data/app/com.lms.ledtool-fqNRAR4tpWe--GDDOnD8pw==/split_lib_slice_1_apk.apk!/lib/arm64-v8a, /data/app/com.lms.ledtool-fqNRAR4tpWe--GDDOnD8pw==/split_lib_slice_2_apk.apk!/lib/arm64-v8a, /data/app/com.lms.ledtool-fqNRAR4tpWe--GDDOnD8pw==/split_lib_slice_3_apk.apk!/lib/arm64-v8a, /data/app/com.lms.ledtool-fqNRAR4tpWe--GDDOnD8pw==/split_lib_slice_4_apk.apk!/lib/arm64-v8a, /data/app/com.lms.ledtool-fqNRAR4tpWe--GDDOnD8pw==/split_lib_slice_5_apk.apk!/lib/arm64-v8a, /data/app/com.lms.ledtool-fqNRAR4tpWe--GDDOnD8pw==/split_lib_slice_6_apk.apk!/lib/arm64-v8a, /data/app/com.lms.ledtool-fqNRAR4tpWe--GDDOnD8pw==/split_lib_slice_7_apk.apk!/lib/arm64-v8a, /data/app/com.lms.ledtool-fqNRAR4tpWe--GDDOnD8pw==/split_lib_slice_8_apk.apk!/lib/arm64-v8a, /data/app/com.lms.ledtool-fqNRAR4tpWe--GDDOnD8pw==/split_lib_slice_9_apk.apk!/lib/arm64-v8a, /system/lib64, /product/lib64]]
        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
            ... 26 more
        Suppressed: java.io.IOException: No original dex files found for dex location /data/app/com.lms.ledtool-fqNRAR4tpWe--GDDOnD8pw==/split_lib_resources_apk.apk
        at dalvik.system.DexFile.openDexFileNative(Native Method)
        at dalvik.system.DexFile.openDexFile(DexFile.java:354)
        at dalvik.system.DexFile.(DexFile.java:101)
        at dalvik.system.DexFile.(DexFile.java:75)
        at dalvik.system.DexPathList.loadDexFile(DexPathList.java:394)
        at dalvik.system.DexPathList.makeDexElements(DexPathList.java:354)
        at dalvik.system.DexPathList.(DexPathList.java:164)
        at dalvik.system.BaseDexClassLoader.(BaseDexClassLoader.java:74)
        at dalvik.system.BaseDexClassLoader.(BaseDexClassLoader.java:65)
        at dalvik.system.PathClassLoader.(PathClassLoader.java:64)
        at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:73)
        at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:88)
        at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:74)
        at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:40)
        at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:774)
        at android.app.LoadedApk.getClassLoader(LoadedApk.java:857)
        at android.app.LoadedApk.getResources(LoadedApk.java:1108)
        at android.app.ContextImpl.createAppContext(ContextImpl.java:2655)
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6436)
        at android.app.ActivityThread.access$1900(ActivityThread.java:267)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1963)
您有没有遇到过绝望?(睡一觉起来,代码跑不了了)_第1张图片
image.png

  • 解决的办法:删除gradle的本地缓存
  • 在我电脑上的路径是:C:\Users\win7.gradle\caches\transforms-1\files-1.1 如果懒得找相对于的缓存,就全部的清除掉吧!

您有没有遇到过绝望?(睡一觉起来,代码跑不了了)_第2张图片
image.png

你可能感兴趣的:(您有没有遇到过绝望?(睡一觉起来,代码跑不了了))