简体   繁体   中英

Gradle not recognizing classes

I am using IntelliJ and I tried importing a project from github using gradle. For some reason it seems to not be working. When I worked on android all I did was add it to the dependencies and everything worked fine. But I did the same thing here and nothing works. Does anyone have any idea on how to fix this? All I did was create a project and add the dependencies and URL to the gradle file. I then copied and pasted the test code from the github repo and I cant import the files.

Thanks

group 'Project'
version '1.0-SNAPSHOT'

apply plugin: 'java'

sourceCompatibility = 1.8

repositories {
    mavenCentral()
    url  "https://dl.bintray.com/patriques82/maven"
}

dependencies {
    testCompile group: 'junit', name: 'junit', version: '4.12'
    compile 'org.patriques:alphavantage4j:1.2'
}

Maybe instead of

url  "https://dl.bintray.com/patriques82/maven"

it should be

maven{
    url  "https://dl.bintray.com/patriques82/maven"
}

?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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