Import by copy and by link is different
What P. Lorand does is referring to the module, not copying, so any changes that he makes to the module affect all other applications that refer to the module.
Using the method of Ivan Milisavlevich, the module is copied to the application. Editing an imported module is only valid in the application, sometimes a good idea, sometimes annoyance.
Application and module have different structure
The application has the root of the application and the application module inside it, commonly called the application.
The root module is the module itself.
changing this:
project(':Android-ChatHead').projectDir=new File('/Users/lorand/AndroidStudioProjects/Doritest/android_chatHeads')
to
project(':Android-ChatHead').projectDir=new File('/Users/lorand/AndroidStudioProjects/Doritest/android_chatHeads/moduleName')
may I help.
Also, if you are converting an application into a module, be sure to rename the app , two modules with the same app name are a promise of disaster.
With Android ChatHead
It contains the application folder, therefore it is an application, not a module.
build.gradle contains the line apply plugin: 'com.android.application' , so the application bit must be replaced with library .
Comment applicationId "henrychuang.tw.chatheadmsg" .
Rename the module name application to another; I never did this manually, with the android studio ctl + alt + r on the Application tab on the Project tab.
Then everything will be fine. First try to import a copy.
source share