Android systemui (imported to eclipse and can run normally)

Source: Internet
Author: User
1. Import the systemui source code to eclipse

Import the frameworks \ base \ packages \ systemui code to eclipse.

Screenshotstubactivity is used for testing and is not imported.

The project name is dreamsdocklauncher, which is the name of an activity class. You can change the project name by F2.

2. Add a jar Library File

There seems to be no error message. Change the target first.

After the project is built, all errors are displayed.

Open bootreceiver and the prompt "the import Android. util. slog cannot be resolved" is displayed.

Locate the following position in the code of slog. Java, and probably judge that it should be in the following Library (in fact, I don't know how to find it)

Out \ target \ common \ OBJ \ java_libraries \ framework_intermediates \ Classes. Jar

Copy framework_intermediates \ Classes. jar and change the name to add it to the project using the following method.

Put it in front.

The Code prompts that resolved has been displayed.

After the project is built, a half of the errors in the project disappear.

Similarly, import out \ target \ common \ OBJ \ java_libraries \ services_intermediates \ Classes. Jar

There is no error message.

3. Change the package name

Be sure not to mistakenly hurt other projects in eclipse.

After the replacement, it is found that the tree structure of the sidebar is all incorrect. Don't panic, In the first package COM. android. press F2 on systemui and manually change the name to com. zheng. systemui, other package names will be automatically replaced (actually a folder ).

Androidmanifest. XML has an error again, and there is a adhesion in it. Replace it with the old one directly, and then there are many permission is only granted to system apps. Just clean the project and I don't know what the problem is.

End.

Attachment: source code

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.