我想在Android Studio中编译jar文件。但是出现错误,提示“无法在org.gradle.api; interna上找到属性文件。
这是代码:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.3'
compile file 'libs/jtds-1.2.7.jar'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
您无需下载jar并添加到lib中,可以使用jcenter repo添加依赖项,将编译文件'libs / jtds-1.2.7.jar'替换为
compile 'net.sourceforge.jtds:jtds:1.3.1'
如果要搜索其他依赖项,则可以在此处搜索http://mvnrepository.com/artifact/net.sourceforge.jtds/jtds/1.3.1
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句