简体   繁体   English

Gradle依赖项不起作用(无法导入)

[英]Gradle dependencies not working (Cannot import)

This screenshot shows my gradle build file 该屏幕截图显示了我的gradle构建文件

This one shows my main class, where im using the class 这是我的主要课程,我在使用该课程

So what im trying to do is import the OKHTTP client lib into my project via gradle, i've included the dependency compile statement and the mavencentral repository but somehow its not showing up in my main file. 因此,我想做的是通过gradle将OKHTTP客户端库导入到我的项目中,我已经包含了依赖项编译语句和mavencentral存储库,但是不知何故它没有显示在我的主文件中。 It seems like the right gradle file too. 似乎也正确的gradle文件。

According to this link sourceCompatibility is a 根据此链接来源,兼容性是

Java version, compatibility to use when compiling Java source. Java版本,在编译Java源代码时使用的兼容性。

1.5 is a old version of JAVA that is why it is giving warning, change it with 1.6 or 1.7 1.5是JAVA的旧版本,因此会发出警告,请使用1.6或1.7进行更改

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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