|
|
|
|
Strumenti |
18-02-2018, 10:38 | #1 |
Member
Iscritto dal: May 2008
Messaggi: 45
|
Android add library project dependency only work if the name is specified as <LIB_NAM
Introduction I have two project (for simplicity I will use the word "prj"), one main prj (TraderGoal) and one lib prj (NoobLib).I want to add the lib prj dependency by passing the prj relative path in the setting.gradle like explained here (I have also tried new File(settingsDir, '../Library/NoobLib/app')). Problem and my code If I set these values: Main prj App module gradle:implementation project (':NoobLib') settings.gradle: include ':app' include ':NoobLib' project(':NoobLib').projectDir = new File(settingsDir, '../Library/NoobLib') the main prj throws me the following error (notice that two gradle files have been added to the prj and it's strange because I should only have the library module gradle and not that two gradles): Right setting and wrong behaviour That is the right way to add the library and that is the way I want to make it works. How it works (in the wrong way) for me If I set these values: Main prj App module gradle: implementation project (':NoobLib-NoobLib') settings.gradle: include ':app' include ':NoobLib-NoobLib' project(':NoobLib-NoobLib').projectDir = new File(settingsDir, '../Library/NoobLib/app') Everything works as expected and I can see the library project added as a normal module and I can work with like I want to. Screenshot: |
Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 02:18.