1

I am trying to add aws-android-sdk-1.6.1-debug.jar (Amazon Cloud Service) library to my Android Studio project. So I copied the jar-file to libs-directory, right clicked "Add as library". Then added the line compile files(libs/aws-android-sdk-1.6.1-debug.jar) to the build.gradle file and run gradlew clean bat from command prompt. This bat gives error:

"could not find method compile<> for arguments [file collection]"

Even though the jar-file surely is in the libs-directory. I also tried: compile fileTree(dir: 'libs', include: '*.jar') with the same result. Build in Android Studio gives the same result.

Why the jar could not be found ?

Kartoch
  • 7,610
  • 9
  • 40
  • 68
Heikki
  • 21
  • 3

1 Answers1

3

I had the same problem, but I added the dependencies to the wrong build.gradle. You have to add the dependencies to the AndroidStudioProjects/Project/Project/build.gradle, not AndroidStudioProjects/Project/build.gradle.

jrabaino
  • 56
  • 3