Perfect solution for debugging launcher using eclipse

Source: Internet
Author: User
In the android source code, many methods, members, classes, and packages are tagged with @ hide, which are not disclosed in the SDK, android is the most common class used to compile the launcher source code. view. view member mscrollx cannot be accessed.
The following describes how to solve this problem.
1. Prepare the compiled Android source code.
2. Find the JAR file that contains the hidden classes in the out directory of the source code. The file name is usually classes. jar. For example, the JAR file of the Framework is out \ target \ common \ OBJ \ java_libraries \ framework_intermediates \ Classes. jar.
3. In the android project of Eclipse, choose project properties-> JAVA build path-> libraries-> Add library-> User library-> next-> userlibraries to go to the user libraries management page, and click New to create a user library, for example, android_framework, click Add jars to add the jar package to the created user library, and click OK.
Note: to access such members, you need to change the Class search order, select project Properties> JAVA build path> order and export, and move the created user libraries to the android SDK.
At this time, errors in your eclipse should have been reduced or even eliminated.

To view the effect immediately on the simulator, modify it as follows:
Change the name of the original package. Remember to use the eclipse rename mechanism (Press F2 on the package name to modify), which is not only a reference to the class, there are also many references in XML files (such as import COM. android. launcher3.r;), all of which can be done at one time as long as the rename is good. Finally, in the androidmanifest. xml file, find this sentence and delete it (Android: shareduserid = "android. uid. Shared "). So far, you have your own launcher!

About how to debugCodeFor more information, see the following website:
Original post address: http://blog.163.com/sxs_solo/blog/static/2633338200931385520714/
EOE address: http://www.eoeandroid.com/thread-22210-1-1.html
For the compiled code, see the following post:
[Ff7] share the Eclipse project source code file configured by adw_launcher and 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.