Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
310 views
in Technique[技术] by (71.8m points)

android - AndroidStudio - Module Dependencies in Gradle

I have a little problem compiling an android application using module dependencies in Android Studio.

So, I want my application to use the library 'slidingmenu' (link here).

Here is my application tree:

  • Application
  • slidingmenu (source files)
  • slidingmenu-maps-support (source files)

Here is a link to see what I mean.

This is the error I'm getting.

Gradle: A problem occurred configuring project ':Application'.

Failed to notify project evaluation listener.

Configuration with name 'default' not found.

How do I specify a module dependency and where do I put the modules (inside Application or inside ApplicationProject?

Thanks!

EDIT 1: Never mind! I got back to eclipse! Android Studio is just not ready for a true project development.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

You should put your library modules inside the Application Project. In order to specify a module dependency, simply:

  1. Right click on Application->Open Module Settings
  2. Click on the '+' icon
  3. Select the root directory for your library module you'd like to add.
  4. Follow the prompts

Then, this module will show up in your project. Then, you need to add it to Application as a library dependency. Once again, in your Module Settings:

  1. Select your Application module
  2. Select the Dependencies tab on the right
  3. Click the '+' icon on the bottom
  4. Select Module Dependency
  5. Select your desired library module

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...