1

Hi I am having problem at importing 'commons-lang3-3.1' in Android Studio. I am facing problem with given details message. The error message is given below. And it may help you to solve the problem that I have pasted the commons-lang3-3.1.zip file directly in the libs folder. So do you think that for the zip format I am getting error message? Thank you.

Error:(25, 0) Project with path ':libs:commons-lang3-3.1' could not be found in project ':app'.

1 Answers1

1

Just add to build.gradle file and rebuild project:

dependencies {
    compile  'org.apache.commons:commons-lang3:3.1'
}

Do not add zip to libs folder.

Max77
  • 1,466
  • 13
  • 19
  • So you mean I will unzip the library at first and the put those files into the 'libs' folder? Or you said that no need to copy-paste? Forgive if I had done anything wrong – Md. Jobayer Jun 20 '15 at 13:22
  • In this case no need for unzipping and copying files, Gradle will download library from central repository. Sometimes you need to put jar (not zip) to libs folder, if library is not present in central repository - http://stackoverflow.com/questions/16608135/android-studio-add-jar-as-library – Max77 Jun 20 '15 at 13:27
  • Thank you boss... :-) I am done. I have successfully imported the library. – Md. Jobayer Jun 20 '15 at 13:30
  • If my answer helped you, please upvote and accept it :) – Max77 Jun 20 '15 at 13:31
  • Ah... Sorry brother. To vote you up I need 15 reputation which is unavailable to me. This is a new account to Stackoverflow. Otherwise I would vote undoubtly. – Md. Jobayer Jun 20 '15 at 13:37
  • Ok brother, one more and that is - can I import any library like this way? – Md. Jobayer Jul 03 '15 at 12:54
  • This way you can only import libraries presented in jCenter, read http://stackoverflow.com/questions/31022373/how-does-publishing-android-libraries-that-can-be-imported-easily-by-other-peopl – Max77 Jul 03 '15 at 13:37