Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.16.0 android 编译问题记录 #10

Open
Tlanglord opened this issue Jul 15, 2024 · 0 comments
Open

v0.16.0 android 编译问题记录 #10

Tlanglord opened this issue Jul 15, 2024 · 0 comments

Comments

@Tlanglord
Copy link

Tlanglord commented Jul 15, 2024

运行命令:
npm run build:bridge:android

  1. 本地ndk path 配置问题 , 建议在检测ndk时可以判断下是否带目标版本

报错:Could not find toolchain file:

Could not find toolchain file: /***/Library/android/sdk/ndk/build/cmake/android.toolchain.cmake

原因:本地机器配置的ndk路径没有带版本 ,类似:path=/***/Library/android/sdk/ndk,导致拿到的ndk版本不对。根据报错信息找到文件:https://github.com/openwebf/webf/blob/b07bef9f478f261ca669b9110e10ca5722881381/scripts/tasks.js

image

修改方式:去掉if判断 ,

if (process.env.ANDROID_NDK_HOME) { ndkDir = process.env.ANDROID_NDK_HOME; }

  1. cmake版本问题

报错:add_compile_definitions

原因: cmake v3.12 新增,openwebf-contributing-guide https://github.com/openwebf/webf/blob/main/.github/CONTRIBUTING.md#openwebf-contributing-guide建议v3.10.0 or later , 我这边装的v3.10.0

修改方式:升级cmake

@Tlanglord Tlanglord changed the title 编译问题记录 v0.16.0 android 编译问题记录 Jul 15, 2024
@Tlanglord Tlanglord reopened this Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant