原文地址:

https://github.com/liquiddandruff/FBReaderJ/blob/android_studio/README.md

Building FBReader using Android Studio and Gradle

Tested on a fresh installation of Windows 8.1 x64 using Android Studio v1.02 build 1653844, jdk-7u71-windows-x64, and android-ndk-r10d.
  1. Clone the project into your %userprofile%\AndroidStudioProjects\

  2. Import the project into Android Studio

  3. Perform a project level gradle sync (CTR+SHIFT+A and search for "project sync", double click the first result).
    Android Studio may complain about not finding a git.exe in your path, but this will not prevent you from building the project

  4. Install Android SDK Platform API 14 when prompted

  5. Install Android SDK Platform API 5 when prompted

  6. Install Android SDK Platform API 11 when prompted

  7. FBReader has now been successfully built using Android Studio, but is missing the necessary binaries (*.so)

Compiling the binaries

  1. To compile the binaries from the source, navigate to where you extracted the NDK

  2. Execute the following command in your shell:

    ndk-build -C %userprofile%\AndroidStudioProjects\FBReaderJ\fBReaderJ\src\main\jni

    The binaries should be automatically placed into the appropriate directories (%userprofile%\AndroidStudioProjects\FBReaderJ\fBReaderJ\src\main\lib)

  3. Finally, rebuild the project. FBReader should now run without issue on the emulator/on your device.

Generating the introductory help epubs

This step is optional. If you would like to see the introductory help epub when FBReader starts, execute the following commands in your shell and rebuild the project:

cd %userprofile%\AndroidStudioProjects\FBReaderJ\help\
generate.py proto html ..\fBReaderJ\src\main\assets\data\intro\

ECLIPSE ANDROID PROJECT IMPORT SUMMARY

Manifest Merging:

Your project uses libraries that provide manifests, and your Eclipse project did not explicitly turn on manifest merging. In Android Gradle projects, manifests are always merged (meaning that contents from your libraries' manifests will be merged into the app manifest. If you had manually copied contents from library manifests into your app manifest you may need to remove these for the app to build correctly.

Replaced Jars with Dependencies:

The importer recognized the following .jar files as third party libraries and replaced them with Gradle dependencies instead. This has the advantage that more explicit version information is known, and the libraries can be updated automatically. However, it is possible that the .jar file in your project was of an older version than the dependency we picked, which could render the project not compileable. You can disable the jar replacement in the import wizard and try again:

android-support-v4.jar => com.android.support:support-v4:18.0.0

Moved Files:

Android Gradle projects use a different directory structure than ADT Eclipse projects. Here's how the projects were restructured:

In AmbilWarna:

  • AndroidManifest.xml => ambilWarna\src\main\AndroidManifest.xml
  • res\ => ambilWarna\src\main\res\
  • src\ => ambilWarna\src\main\java\

In code:

  • AndroidManifest.xml => code\src\main\AndroidManifest.xml
  • res\ => code\src\main\res\
  • src\ => code\src\main\java\

In library:

  • AndroidManifest.xml => library\src\main\AndroidManifest.xml
  • res\ => library\src\main\res\
  • src\ => library\src\main\java\

In FBReaderJ:

  • AndroidManifest.xml => fBReaderJ\src\main\AndroidManifest.xml
  • assets\ => fBReaderJ\src\main\assets\
  • jni\ => fBReaderJ\src\main\jni\
  • libs\httpmime-4.2.5.jar => fBReaderJ\libs\httpmime-4.2.5.jar
  • libs\json-simple-1.1.1.jar => fBReaderJ\libs\json-simple-1.1.1.jar
  • libs\LingvoIntegration_2.5.2.12.jar => fBReaderJ\libs\LingvoIntegration_2.5.2.12.jar
  • libs\nanohttpd-2.0.5.jar => fBReaderJ\libs\nanohttpd-2.0.5.jar
  • libs\open-dictionary-api-1.2.1.jar => fBReaderJ\libs\open-dictionary-api-1.2.1.jar
  • libs\pdfparse.jar => fBReaderJ\libs\pdfparse.jar
  • res\ => fBReaderJ\src\main\res\
  • src\ => fBReaderJ\src\main\java\
  • src\org\geometerplus\android\fbreader\api\ApiInterface.aidl => fBReaderJ\src\main\aidl\org\geometerplus\android\fbreader\api\ApiInterface.aidl
  • src\org\geometerplus\android\fbreader\api\ApiObject.aidl => fBReaderJ\src\main\aidl\org\geometerplus\android\fbreader\api\ApiObject.aidl
  • src\org\geometerplus\android\fbreader\api\TextPosition.aidl => fBReaderJ\src\main\aidl\org\geometerplus\android\fbreader\api\TextPosition.aidl
  • src\org\geometerplus\android\fbreader\config\ConfigInterface.aidl => fBReaderJ\src\main\aidl\org\geometerplus\android\fbreader\config\ConfigInterface.aidl
  • src\org\geometerplus\android\fbreader\formatPlugin\CoverReader.aidl => fBReaderJ\src\main\aidl\org\geometerplus\android\fbreader\formatPlugin\CoverReader.aidl
  • src\org\geometerplus\android\fbreader\httpd\DataInterface.aidl => fBReaderJ\src\main\aidl\org\geometerplus\android\fbreader\httpd\DataInterface.aidl
  • src\org\geometerplus\android\fbreader\libraryService\LibraryInterface.aidl => fBReaderJ\src\main\aidl\org\geometerplus\android\fbreader\libraryService\LibraryInterface.aidl
  • src\org\geometerplus\android\fbreader\libraryService\PositionWithTimestamp.aidl => fBReaderJ\src\main\aidl\org\geometerplus\android\fbreader\libraryService\PositionWithTimestamp.aidl
  • src\org\geometerplus\android\fbreader\network\BookDownloaderInterface.aidl => fBReaderJ\src\main\aidl\org\geometerplus\android\fbreader\network\BookDownloaderInterface.aidl

Next Steps:

You can now build the project. The Gradle project needs network connectivity to download dependencies.

Bugs:

If for some reason your project does not build, and you determine that it is due to a bug or limitation of the Eclipse to Gradle importer, please file a bug at http://b.android.com with category Component-Tools.

(This import summary is for your information only, and can be deleted after import once you are satisfied with the results.)

FBReader导入eclipse 和Androidstudio相关问题相关推荐

  1. 从Eclipse中导入项目到AndroidStudio中

    准备好你的项目 导入Eclipse ADT,Gradle,etc 点击import project(Eclipse ADT,Gradle,etc) 选择你要导入到的路径 创建配置文件 Finish 等 ...

  2. 导入eclipse工程到Android Studio中

    ref: 从 Eclipse 迁移至 Android Studio | Android Studio https://developer.android.com/studio/intro/migrat ...

  3. java导入包大全_eclipse快速导入jar包的相关操作步骤

    eclipse怎样快速导入jar包呢?熟悉这款软件是非常简单的,今天小编就分享了关于eclipse快速导入jar包,有需要的朋友一起来看看吧! eclipse快速导入jar包的相关操作步骤 方法1·最 ...

  4. 解决AndroidStudio2.0导入eclipse项目时卡死的问题

    在这之前因为电脑渣,跑不动AndroidStudio,所以一直都在用eclipse.最近听说AS更新了2.0版本,比以前流畅多了,于是,我激动地在我的Ubuntu上装上了AS(因为Ubuntu上运行A ...

  5. android项目模块导入eclipse编译报错,android中studio导入eclipse项目报错怎么办

    android中studio导入eclipse项目报错怎么办 发布时间:2020-07-15 17:34:45 来源:亿速云 阅读:96 作者:清晨 这篇文章将为大家详细讲解有关android中stu ...

  6. androidstudio自动生成变量_使Eclipse或AndroidStudio的代码模板自动生成类名和方法名...

    开发过程里打印Log经常要表明Log所在的类和方法, 比如: Log.e(TAG,"MainActivity.onResume. Are you ok?"); 以前每次都是手打或复 ...

  7. Jmeter-3.0的源码导入eclipse并执行

    最近在研究jmeter二次开发,所以需要先jmeter导入Eclipse,后续还需要学习jmeter源码以及二次开发的相关知识,到时候也会分享出来,下面是jmeter导入Eclipse的过程 首先去官 ...

  8. maven创建Java 和 Web Project, 并导入Eclipse

    Java项目 创建一个JavaStudy的Project , 步骤如下: 1. 命令行切换到目录 cd D:\devworkspace\ecpoxyworkspace 2. 执行创建命令 mvn ar ...

  9. 把myeclipse中的web项目导入eclipse中不能编程web项目的解决办法

    title: 把myeclipse中的web项目导入eclipse中不能编程web项目的解决办法 tags: grammar_cjkRuby: true --- 右键单击项目,properties-- ...

  10. Android Studio导入Eclipse项目的两种方法

    Android Studio导入Eclipse项目有两种方法,一种是直接把Eclipse项目导入Android Studio,另一种是在Eclipse项目里面进行转换,然后再导入Android Stu ...

最新文章

  1. 状态压缩dp(hdu2662)(我综合了一个人的解释和另一个人的代码)
  2. 一眼识别这是什么鸟,比人类还厉害的“我们来找茬”十级选手诞生!
  3. [汇编] 001基础知识-什么是汇编
  4. 【Transact-SQL】SQL Server自动把left join自动转化为inner join、以及关联时的数据重复问题...
  5. PHP中单引号和双引号的区别
  6. 博士申请 | 宾夕法尼亚州立大学招收机器学习/人工智能方向全奖博士
  7. Android 高级Drawable资源---复合Drawable----变换Drawable
  8. 大数据之Kafka集群安装及简单使用
  9. Linux Shell笔记5 Linux的文件系统
  10. C语言每日一题之No.12
  11. struts2 拦截器_Struts2 execAndWait拦截器示例,用于长时间运行的动作
  12. 《Spring源码深度解析》
  13. Windows配置Caffe教程
  14. java记账软件开发_Java项目之家庭记账软件
  15. 索尼z3c d5833港版救砖强刷说明
  16. 关于ESD的一些知识
  17. 【云驻共创】当HarmonyOS走进课堂是种什么体验
  18. vivo NEX3史上最强旗舰机!瀑布屏+骁龙855+44W+5G,对战华为
  19. 获奖结果公布|2020腾讯犀牛鸟云开发校园技术布道师养成计划
  20. 矩形连乘问题c语言,矩阵连乘问题

热门文章

  1. 【uniappAPP实现支付宝授权登录】
  2. UNIX时间戳和北京时间的相互转换
  3. 优麒麟 20.04 LTS Pro安装Canon LBP2900打印机
  4. 基于74hc573的数码管模块测试
  5. CSS3和jQuery实现花瓣网固定顶部位置悬浮菜单效果
  6. 数学专项counting:LA 5846
  7. TCP/IP协议栈扫盲班
  8. 时间序列分析——第三章 资产收益率序列
  9. war3鸿蒙大陆攻略,【魔兽rpg地图失落大陆攻略汇总】
  10. 生来只为丈量天空,开普勒的传奇一生