enter image description here java.lang.NoClassDefFoundError:org / junit / platform / commons / util / Preconditions在org.junit.platform.launcher.core.LauncherFactory.create(LauncherFactory.java:83)在org.junit.platform.launcher.core.LauncherFactory.create(LauncherFactory.java:67)在org.eclipse.jdt.internal.junit5.runner.JUnit5TestLoader。(JUnit5TestLoader.java:34)在java.base / jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(本地方法)在java.base / jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)在java.base / jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)在java.base / java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)在java.base / java.lang.reflect.ReflectAccess.newInstance(ReflectAccess.java:166)在java.base / jdk.internal.reflect.ReflectionFactory.newInstance(ReflectionFactory.java:404)在java.base / java.lang.Class.newInstance(Class.java:591)在org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.createRawTestLoader(RemoteTestRunner.java:371)在org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.createLoader(RemoteTestRunner.java:366)在org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.defaultInit(RemoteTestRunner.java:310)在org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.init(RemoteTestRunner.java:225)在org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:209)引起原因:java.lang.ClassNotFoundException:org.junit.platform.commons.util.Preconditions在java.base / jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:602)在java.base / jdk.internal.loader.ClassLoaders $ AppClassLoader.loadClass(ClassLoaders.java:178)在java.base / java.lang.ClassLoader.loadClass(ClassLoader.java:521)... 15更多
我每次尝试运行单元测试时都遇到此错误,并且尝试对其他包中的类使用该测试,而不是具有Test类但没有用的包。我需要你的帮助。 😁
JUnit Platform