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 ?
I had the same problem, but I added the dependencies to the wrong
build.gradle
. You have to add the dependencies to theAndroidStudioProjects/Project/Project/build.gradle
, notAndroidStudioProjects/Project/build.gradle
.