问题
I am trying to include a local jar file in my "Java" gradle project. I have added jar files in my "main/resource" folder of project. and in build.gradle added following lines :-
compile files('./src/main/resources/abc.jar')
It is not showing me any error at compile time. But when i run my project it is showing me following error:-
"Caused by: java.lang.NoClassDefFoundError: javax/json/Json"
回答1:
you need to add its dependency in gradle file.
compile fileTree(dir: 'libs', include: ['*.jar'])
来源:https://stackoverflow.com/questions/49379578/include-jar-files-in-gradle-project