Questions tagged «gradle-eclipse»

16
如何将本地.jar文件依赖项添加到build.gradle文件?
所以我试图将我的本地.jar文件依赖项添加到我的build.gradle文件中: apply plugin: 'java' sourceSets { main { java { srcDir 'src/model' } } } dependencies { runtime files('libs/mnist-tools.jar', 'libs/gson-2.2.4.jar') runtime fileTree(dir: 'libs', include: '*.jar') } 您会看到我将.jar文件添加到了这里的referencedLibraries文件夹中:https : //github.com/WalnutiQ/wAlnut/tree/version-2.3.1/referencedLibraries 但是问题是,当我在命令行上运行命令:gradle build时,出现以下错误: error: package com.google.gson does not exist import com.google.gson.Gson; 这是我的整个仓库:https : //github.com/WalnutiQ/wAlnut/tree/version-2.3.1
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.