Gralex
Gralex

Reputation: 4485

No "Project settings" in "Project structure"

I start learn android development, and I can't figure out how to add library to project. I use Android Studio. I create new project, and I don't have Project Settings in Project Structure.enter image description here

Upvotes: 9

Views: 18682

Answers (2)

owe
owe

Reputation: 4930

You have to do it manually with gradle.

In this post you can see how your project structure should be and how to add a project lib to your project.

A little summary:

  • create a folder named "libraries" into your Project "TestAddLib"
  • copy your project lib into this folder
  • then you have to configure your gradle files:

  • in you settings.gradle you have to include all your moduls -> your TestAddLib and your project libs

  include ':TestAddLib', ':TestAddLib:libraries:projectLib'
  • add the project lib into your TestAddLib (-> edit build.gradle file of your TestAddLib) as dependency using this code:
 dependencies {   
      compile project(':TestAddLib:libraries:projectLib')
 }
  • But remember: Your project lib need a build.gradle file, too. You get the right file by exporting it in eclipse.

Here are more questions about gradle and project libs: general description, build.gradle file of project lib

Upvotes: 0

Jon
Jon

Reputation: 1388

Right click on your Package name in the Project window and select "Open Module Settings." That should bring up the settings window you're looking for.

Personally, I haven't had any luck what so ever with the Gradle documentation so I've just been importing and creating different projects and trying to figure out how things are set up. I'm sure there is probably some better documentation for it out there somewhere, but I haven't been able to find it yet.

Gradle 1.7 Dependency Handlers

Upvotes: 11

Related Questions