首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >为Android编译PDFium的正确选项是什么?

为Android编译PDFium的正确选项是什么?
EN

Stack Overflow用户
提问于 2019-06-12 01:00:44
回答 1查看 432关注 0票数 3

我正在尝试为安卓系统构建PDFium。我使用的是Debian扩展。

我执行了以下命令:

代码语言:javascript
复制
> mkdir build
> cd build
> mkdir build/source
> cd source
> gclient config --unmanaged https://pdfium.googlesource.com/pdfium.git
> echo "target_os = [ 'android' ]" >> .gclient
> gclient sync
> cd pdfium
> build/install-build-deps-android.sh

一旦安装了依赖项,我就执行了以下命令:

代码语言:javascript
复制
> gn args wx/arm64/release

我把这些作为论据

代码语言:javascript
复制
# Build arguments go here.
# See "gn args <out_dir> --list" for available build arguments.
target_os = "android"
target_cpu = "arm64"  # See "Figuring out target_cpu" below
use_goma = false  # Googlers only. Make sure goma is installed and running first. 
is_debug = false  # Enable debugging features.  
# Set true to enable experimental Skia backend. 
pdf_use_skia = false 
# # Set true to enable experimental Skia backend (paths only). 
pdf_use_skia_paths = false  
pdf_enable_xfa = false  # Set false to remove XFA support (implies JS support). 
pdf_enable_v8 = false  # Set false to remove Javascript support. 
pdf_is_standalone = true  # Set for a non-embedded build.  
is_component_build = true # Disable component build (Though it should work) # 
clang_use_chrome_plugins = false  # Currently must be false.
use_cxx11_on_android=false

当我退出编辑器时,我得到以下错误:

代码语言:javascript
复制
ERROR Unresolved dependencies.
//:pdfium_embeddertests__exec(//build/toolchain/android:android_clang_arm64)
  needs //build/android:cpplib_stripped(//build/toolchain/android:android_clang_arm64)
//:pdfium_unittests__exec(//build/toolchain/android:android_clang_arm64)
  needs //build/android:cpplib_stripped(//build/toolchain/android:android_clang_arm64)

你能帮我吗?你对我在这里犯的错误有什么想法吗?这是错误的配置吗?是否缺少依赖项?

非常感谢你能给我的帮助。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-06-12 14:57:46

我回答自己的问题,以防别人遇到同样的问题。这是Pdfium构建脚本中的一个问题。

这个问题现在已经在Pdfium/master中修复了(感谢Pdfium团队!)

如果您有一个较旧的版本,您只需删除这些行

代码语言:javascript
复制
if (is_component_build || is_asan) {
  data_deps += [ "//build/android:cpplib_stripped" ]
}

在文件the /test.gni中

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/56548558

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档