使用 Gradle 构建可以这样导入整个编译依赖
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar']) // 像是这样
compile('io.socket:socket.io-client:0.7.0') {
exclude group: 'org.json', module: 'json'
}
compile 'com.android.support:appcompat-v7:23.2.0'
compile 'com.android.support:recyclerview-v7:23.2.0'
compile 'com.android.support:design:23.2.0'
compile 'com.google.android.gms:play-services-appindexing:8.1.0'
testCompile 'junit:junit:4.12'
}但是找遍了 Maven 的插件,只有添加单个 jar
org.x my-jar 1.0 system ${project.basedir}/lib/x.jar
另外使用添加 classpath 的方法也没用,编译的时候还是出错
org.apache.maven.plugins maven-surefire-plugin 2.19.1 ${project.basedir}/src/main/webapp/WEB-INF/lib
项目原本是 eclipse dynam web project
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
添加单个Jar依赖
${basedir}为项目根目录