I'm having an issue with importing amazonaws in my gradle and would greatly appreciate any help. Thanks!
Problem:
I'm attempting to import 'com.amazonaws.auth.*' into my build.gradle, however a red line appears under the statement stating "Cannot resolve symbol 'amazonaws'".
What I've attempted:
- Sync Gradle and rebuild
- Invalidate cache and restart
- Attempted to follow the answer here to no avail
build.gradle code:
buildscript {
...
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.amazonaws:aws-java-sdk-core:1.11.5'
}
}
import com.amazonaws.auth.*
def getAwsReadOnlyCredentials = {
...
return new DefaultAWSCredentialsProviderChain().getCredentials()
}
AWSCredentials libraryCredentials = getAwsReadOnlyCredentials()
allprojects {
repositories {
google()
jcenter()
maven {
...
}
}
}
...