Steps to compile the android4.0 browser in eclipse

Source: Internet
Author: User

Project Source:

Attention:

If you download the source code that has been repaired, it should be possible to do 3, 4, and 8 steps. Eclipse version: Adt-bundle-windows (Android Developer Tools build:v21.0.0-519525)
1. Copy a browser code from the android4.0 system code to the local folder and rename it to Browsereclipse: < android4.0 source >/package/apps/browser-< Local Directory >/browsereclipse
2. Import the engineering Browsereclipse in Eclipse. Menu File-import, select Android-existing Android Code into Workspace. Browse for the folder and select the project's root directory:< local directory >/browsereclipse. Remove the Tests Project Check button, temporarily regardless of the tests project. Rename Project: Select project, right mouse button menu-refactor-rename, enter Browsereclipse. At this time, there will be a lot of mistakes in the project, temporarily ignore.

3. Add the library file.

Copy the corresponding file from the compiled android4.0 source's out directory to the Browsereclipse systemlib path, the file is as follows: browsereclipse\systemlib\out\target\common\ Obj\java_libraries\android-common_intermediates\classes.jar Browsereclipse\systemlib\out\target\common\obj\java _libraries\android-support-v13_intermediates\classes.jar Browsereclipse\systemlib\out\target\common\obj\java_ Libraries\android-support-v4_intermediates\classes.jar Browsereclipse\systemlib\out\target\common\obj\java_ Libraries\core_intermediates\classes.jar

Browsereclipse\systemlib\out\target\common\obj\java_libraries\framework_intermediates\classes.jar

Refresh the project in Eclispe, then select the project, the right mouse button menu-build path-configure Build Path, in the Libraries page, select Add Library-user libraries-new, Enter the library name Systemlib, and tick the "System library" below the input box.

Go back to the User Libraries window, select the newly created systemlib, click the button "Add JARs" and add the five Classes.jar below the Systemlib\ folder.

  

OK button, go back to the Java Build path interface, select the order and Export page, select the new build Systemlib, click the top button, top to first, OK.

  

4. Set the Java compiler version to 1.6. Then select the project, the right mouse button menu-properties-java Compiler, select 1.6
5. Block some code. After the 3rd step, go back to eclipse editing interface, refresh the project, at this time most of the errors have been resolved, only a few errors, the wrong place to block out, you can: mask eventlogtags related rows: browsereclipse\src\com\ Android\browser\logtag.java; shielded visiblefortesting-related lines: Browsereclipse\src\com\android\browser\ Browseractivity.java Browsereclipse\src\com\android\browser\provider\browserprovider2.java BrowserEclipse\src\ Com\android\browser\autocomplete\suggestedtextcontroller.java at this point, there should be no compilation errors.
6. Add a Java file to avoid run-time errors: Browsereclipse\src\com\android\common\content\syncstatecontentproviderhelper.java From android4.0 Source: Frameworks\ex\common\java\com\android\common\content\syncstatecontentproviderhelper.java
7. Modify Browsereclipse\androidmanifest.xml, add <uses-sdk android:minsdkversion= "+"/> Modify browsereclipse\ The target property value in Project.Properties, set to Target=android-14
8. Uninstall the System Application broser.apk, install the browsereclipse.apk. This requires the machine root before it can be done, this apk can only operate in the android4.0 system, not run in 4.1. Back up/system/app/browser.apk and Browser.odex, copy to/sdcard. Remove/system/app/browser.apk and Browser.odex and restart the machine. Install browsereclipse.apk to see the effect.

Steps to compile the android4.0 browser in eclipse

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.