简体   繁体   English

IntelliJ无法识别符号:Gradle,Scala,AWS

[英]IntelliJ does not recognize symbols: Gradle, Scala, AWS

I'm using Gradle to build something for AWS with Scala. 我正在使用Gradle使用Scala为AWS构建内容。 In my source file I have this: 在我的源文件中,我有这个:

import com.amazonaws.services.lambda.runtime.{Context => LambdaContext}

in my build.gradle file, I have this: 在我的build.gradle文件中,我有这个:

compile 'com.amazonaws:aws-lambda-java-core:1.1.0'

the code builds fine and works, but IntelliJ keeps giving me an error that "Context" is ambiguous, and the choices it gives do not include a class in the AWS library. 该代码可以正常运行,但是IntelliJ不断给我一个错误,提示“上下文”是模棱两可的,并且它给出的选择不在AWS库中包含类。 I'm getting this for all of the AWS libraries I'm using. 我正在使用所有正在使用的AWS库。

I was able to solve this by adding this: 我能够通过添加以下内容解决此问题:

apply plugin: 'idea'

to build.gradle. build.gradle。

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

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