Android Studio takes Eclipse's project as a dependent library of module

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.