Conversion between the Ecplise project and the Androidstudio project

Source: Internet
Author: User

Conversion between the Ecplise project and the Androidstudio project

In order to help some of the children's shoes just contact Androidstudio, here I have a little experience I have figured out to share with you! There are two ways in which the Ecplise project becomes as a project, one that does not change the original project structure, just compiles the Ecplise project with AS (for development where ecplise and as coexist), and the other is to change the directory structure and use Gradle to compile as the new as project.

    • Open Ecplise Project directly using Androidstudio
      In the Ecplise project structure such as

Find the file path of the project

Next open as Select Import Project (ecplise adt,gradle etc) option

After selecting the following, find the project that needs to be changed (you need to go to the project folder when you choose it, not the specific to the individual moudle)

Click OK to select the first option after the following screen

Click Next to rename the project.

If you need to modify, then click Next, as follows is to select the source and resource files to be added to the project, we all choose by default, of course, you can also go to the electricity Gen directory, that is clean after the conversion project

Select OK then click Next, to jar package, class library Select

Select the compiled JDK and SDK click Next

This page is checked by default, click Finish to complete the conversion of the project, such as

At this point the project is ready to run, but you need to specify the startup Moudle


Select OK and click Apply then click OK, then you can run the project. This method is actually compiled with Androidstudio Ecplise project, the directory structure of the project has not changed, nor with Gradle compiled, the project runs as fast as ecplise, that is, we give Androidstudio the location of the specified source and resource files, such as manual development of the relevant file path

This will manually specify the compiled source code, and the resource file

It can be seen that the engineering structure of the source code has not changed at all

    • Change the original structure of the project by turning the Ecplise project into a gradle project
      1. Use Ecplise to import the project as a Gradle project
      Right-click-import Select Generate Gradle build file under Android

      Click Next, then next to select the project interface you want to import

      Then click Next until finish. Project import complete, look at a document project structure

      The structure of the moudle also changed.

      The project at this point is a Androidstudio project that can be opened directly as run. However, experienced children's shoes will find that the first compilation of the project is slow, so let's change a few places before opening.
      2. Modify the configuration file
      Modify the project's Build.gradle file
      My Gradle plug-in version is 2.10, so modify it (HTTPS download is a bit slow, you can change to HTTP, pro-test is available) as follows

{    repositories {        jcenter()    }    {        classpath ‘com.android.tools.build:gradle:2.1.2‘    }}

Modify the Gradle-wrapper.properties file in the Gradle directory
My Gradle plug-in version is 2.10, so modify it (HTTPS download is a bit slow, you can change to HTTP, pro-test is available) as follows

distributionBase=GRADLE_USER_HOMEdistributionPath=wrapper/distszipStoreBase=GRADLE_USER_HOMEzipStorePath=wrapper/distsdistributionUrl=http\://services.gradle.org/distributions/gradle-2.10-all.zip

Now the basic configuration modification is complete to open the project.

For example, the structure has changed

Click OK to compile a moment to complete the project conversion, the effect is as follows:

Then you can run it.

Summary: In fact, a new tool out, more ramming drum will play. Friendly tips, some children's shoes after this conversion, you need to manually develop the following jnilibs files, if you need to compile the NDK, configure the NDK compilation environment.

Conversion between the Ecplise project and the Androidstudio project

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.