0

I'm trying to import existing code (library) into Android Studio workspace according to this guide.

A have done everything step-by-step and Gradle refuses to synchronize project with error message:

Gradle 'MyApplication' project refresh failed. Error:Configuration with name 'default' not found.

Any ideas what went wrong?

Community
  • 1
  • 1
AnZyuZya
  • 201
  • 1
  • 3
  • 18

1 Answers1

2

You're following an outdated guide.

You should add a new module via File -> Project Structure then click the + button.

You then have various options to import libraries.

To include your library in another project add a compile project definition to your dependancies:

dependencies {
    compile project(':mylibrary')
}
Philio
  • 3,675
  • 1
  • 23
  • 33
  • 1
    Thanks for answer. But there's some problem. I'm trying to add that library via _File > Project Structure> + > Import Existing Project_. And when I select the folder with library (I copied it to source folder of app in 'lib') it gives an error: **Specify location of the Gradle or Android Eclipse project**. I must be missing some simple thing... – AnZyuZya Nov 02 '14 at 15:01
  • Did you try and import the library folder in that Github probject? – Philio Nov 02 '14 at 15:04