Import a module or project as a library on Android Studio

I want to use HoroEverywhere (HE) Preferences AddOn with my live wallpaper project. The project is almost complete, I just need it to look the same from android 2.3 to 4.4, so I continued and followed the manual to get HE from GitHub.

After checking and successfully testing the "Demo" module, I returned to my project, but I can only create a new module and not import it, and I will try to install a new project in the module folder (library and add-ons in my case) of Android Studio, like me, if I want to overwrite the parameters of the module, if I do, it will create a folder, but it will not compile, and import org.holoeverywhere will not work.

+7
java android intellij-idea android-studio
source share
3 answers

Importing modules works correctly in Android Studio 0.5.5

+1
source share

You can install the external module in this way

In the global settings.gradle file add this line

def projectDialogsDir = file('path_of_the_module') def rootProjectDescriptor = settings.rootProject settings.createProjectDescriptor(rootProjectDescriptor, 'yourModule', projectDialogsDir) include(':yourModule') 

Then in the build.gradle files of your application module you just need to add under the dependencies

 dependencies { compile project(':yourModule') } 
+7
source share

There is no import module command yet; you will have to do it manually. A high-level overview is that you need to configure the build.gradle file for your library module, include the library module in your settings.gradle project and add a dependency on your application to the library project (which you can execute manually or through the project structure interface) .

To configure the library module and enable it, you can either authorize the corresponding changes from scratch, or you can use the Add Module user interface to create an empty module, and then copy the files from the library to the template. If you need instructions on how to do the latter to enable the Facebook library, see This: Use facebook sdk in android studio and change if necessary for holoeverywhere.

+2
source share

All Articles