How can i add a library project (lib1), which is a module of one 
AndroidStudioProject(A), into another AndroidStudioProject (we say project 
B)?

Wenn i use File->Import Module under Project B and choose the folder of 
A/lib1, the AndroidStudio make a *COPY* of lib1 as B/lib1.

Please forgive my poor knowledge about Gradle and AndroidStudio



On Wednesday, December 10, 2014 6:42:01 PM UTC+1, Artem Zinnatullin wrote:
>
> Don't worry, of course you can add dependencies on other projects.
> First, take an overview of Gradle documentation.
>
> Then add build.gradle into your library project and add it as dependency 
> in app's build.gradle and add 'include' block to the settings.gradle.
>
> I'd recommend you to read "Gradle Multi-project Builds": 
> https://gradle.org/docs/current/userguide/multi_project_builds.html
> Also, check Android Gradle Plugin User Guide: 
> http://tools.android.com/tech-docs/new-build-system/user-guide
>
> On Wednesday, December 10, 2014 2:48:18 PM UTC+3, Angels Victory wrote:
>>
>> Hello everyone,
>>
>> i am a two-years Android App Developer and struggling of converting from 
>> Eclipse to Android Studio.
>>
>> I agree that there are many *cool* features in new AS IDE which could 
>> improve the work greatly.
>>
>> But one things plagued me very much:
>>
>> *I could not reference a private Android Library Project direct into my 
>> developing Project without creating a another copy*.
>>
>> I already create dosens of private Android Library Project with eclipse 
>> and want to reuse it for always. 
>>
>> What i would do in Eclipse is just rightclick 
>> Project->Properties->Android->Add.. ->Choose library project. 
>>
>> It takes no more than 10 sec and another 30 s to rebuild eclipse project. 
>>
>> By following instructions from Google Developers page I can create or 
>> import module in a AS Project as library. I could add module depencey of 
>> library to the application module. 
>>
>> But what Android Studio do is import the source of my existing old 
>> library project and make a hard copy in my new AS Project folder.
>>
>> I can also not figure out how could a library module of one project be 
>> reused in another AS Project. Will it means that once i improved my library 
>> project code, i must copy it into each AS Projects which contains the hard 
>> copy of that library? What worse is some of my private librarys could have 
>> reference to the other!
>>
>> As i searched by google, what i could do to this situation is uploading 
>> the lib project to a maven resposity and reference via Gadle.This will cost 
>> too much time compare to 10+30s in eclipse - > Just for maybe a small 
>> change of the library project. Or i have to develop all my android app 
>> (application and library) in the same AS Project?
>>
>> I am very appreciate if anyone can tell me that Android Studio has 
>> already such function or is this will be a future consideration of Android 
>> Studio developer team ? 
>>
>> Because it is too important for me! The Eclipse could be slow and stupid 
>> but it allow me to reuse my 2 years code simply.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adt-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to