Compilation of FBReader Android

Source: Internet
Author: User

FBReader is a very good reader. Although the user experience is inferior to the popular reading software in China, many excellent reading software refer to FBReader.

The official FBReader website is Alibaba.

1. Import

After downloading the source code, you must first import it to eclipse. Decompress the source code and selectFile-import, The import dialog box is displayed. Select.

Click Next.

 

  

In the next dialog box, select the FBReader root directory path. Remember to selectCopy projects into workspaceIn this way, you can normally import the project and copy all the files to the workspace.

There are a lot of beginner Android shoes (including me), eager to go through the open-source project from GitHub, selectExiting project into workspace, But promptNo projects are found to import, Or other errors, often cannot be understood. In fact, the import method is wrong.

 

  

2. Configure the Apache Ant Environment

Apache Ant is a tool that automates software compilation, testing, deployment, and other steps. Ant is required for FBReader compilation. First, you must configure the Ant environment.

Download Ant: http://mirrors.hust.edu.cn/apache//ant/binaries/apache-ant-1.9.2-bin.zip

Decompress the package, add the bin directory to the path environment variable, open a cmd window, and enter ant. If the following prompt appears, ant configuration is successful.

  

Return to eclipse, open the imported FBReader project, and have a local. properties under the directory (if not, create one). perform the following Configuration,

Sdk. dir = D :\\ Android \ android-sdk

Ndk. dir = D :\\ Android \ android-ndk

The paths are android sdk and ndk respectively.

3. NDK Compilation

In eclipse, select File-New-Project. In the New Project dialog box, select c/c ++ Makefile Project with Existing Code.

  

In the next dialog box, configure

  

Existing Code LocationIs the jni directory under the root directory of the FBReader project.

Open Application. mk under jni

  

Modify content

APP_ABI: = armeabi
# APP_ABI: = armeabi armeabi-v7a x86 mips mips-r2 mips-r2-sf
# APP_ABI: = all
APP_STL: = stlport_static

This will speed up compilation.

Project-Build All and start compilation. The compilation takes a long time. After compilation is successful, the so file is generated under lib.

  

Note: This compilation method does not require the cygwin environment to be configured, but requires the latest ndk version.

Finally:

Open cmd, switch to the FBReader project and directory, and execute ant release.

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.