简体   繁体   中英

Gradle IntelliJ Idea

when i add slf4j-api-1.6.4.jar and slf4j-nop-1.6.4.jar in my libs folder it works fine but if i replaced them with gradle dependency then while executing the jar it gives me below error.

Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory

these are gradle dependencies for my project for above libraries.

compile group: 'org.slf4j', name: 'slf4j-api', version: '1.6.4'
compile group: 'org.slf4j', name: 'slf4j-nop', version: '1.6.4'

确保您已经运行Gradle Build,它可能没有拉您的依赖项。

请确保您在jar文件(如这些依赖 )。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM