Scenario: We now have an eclipse project that we want to use as a dependency library for the module of Android Studio.
以前我们在eclipse的时候常常是在一个工作区里面把一个A工程 as a liarary一下,然后这个A 工程就不再是一个工程了,而是一个依赖库了,然后其他的B工程就可以依赖这个依赖库了
So how do we do that in as?
Attention:
- Eclipse has a working range equal to project
- Eclispe project equals as module
1. Current situation
Current as configuration:
Android Studio 1.4.1
Compilesdkversion 23
Buildtoolsversion "23.0.1"
First look at the entire working range of our current eclipse
111.jpg
Let's take a look at our new as Project:
?
222.png importing the entire Eclipse project in import mudole mode
Straight to the map, detailed enough.
?
333.png
444.png
?
555.png
?
666.png
?
Import completed, found that the import is not a library, but a application icon
777.png
?
Transform the application into a library
Open the corresponding Build.gradle
Modify the last word of apply plugin and change the application into a library
Then remove the AppID line from the default Config, or comment out
Then recompile, you will find the Applica into the library's logo!
?
888.pngmodule add dependency, put just the library to rely on in
?
999.png
?
10101010.png
?
Shi1111.png
?
shi222
?
Shi3.png completed
Okok.png
Android Studio takes Eclipse's project as a dependent library of module