Import the launcher2 code to eclipse

Source: Internet
Author: User

First, download the androidCodeThe compilation is completed because some compiled class. Jar files are used, and the entire packages/apps/launcher2 folder is copied

In a directory, note that this directory cannot be the Eclipse project directory. I do not know why I cannot create the launcher2 project after using this directory,

You can put the code in another folder, such as a personal directory. After the code is created, move it to the workspace and import the project.

 

1. Copy the launcher2 code to a directory and create an android project launcher2,

Select create from existing code, specify the project path as the copied launcher2 code directory, and click Finish to complete project creation.

In this case, you can delete the project, introduce the code file to the workspace, and then import the project in eclipse. Note that you need to select to import from the existing code.

At this time, the launcher2 project has been imported into eclipse, but there will be more than 100 errors.

 

2. Add the package file used by launcher2.

First, you need to compile the android code. After compilation, some package files will be generated,

Here we use: (the generated package path is out/target/common/obj/java_libraries)

1) framework_intermediates/classes. jar: This is mainly the framework class of Android.

2) android-common_intermediates/classes. jar: This contains the com. Android. Common. Search Class

3) core_intermediates/classes. jar: This package contains the Dalvik. system. vmruntime class.

These are all packages that need to be imported into the project. You can add these packages by configuring the build path of the project,

Right-click the project name and choose build path> Configure build path...> libraries> Add library> User libraries...> New...

Add the three dependent packages one by one and name them android_framework, android_common, and android_core respectively.

After adding the three packages, you also need to put them in front of the android2.3.3 package. You can select order and export in build path configuration.

At this time, you will find that the launcher2 project and there is no error, you can also compile it.

 

3. Modify the launcher2 package name and run the changed launcher2.

 

Related Article

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.