NativeScript / NativeScript/android

java.lang.UnsatisfiedLinkError aab build broken

未关闭
#1,632 12 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

severity: high
主要语言
C++
星标
563
派生
144
平均合并
10 小时 46 分钟
30 天内合并 PR
14

描述

Environment

mutliple versions seems to be affected at least up to

Installed
Android SDK : 29
Android SDK Build-Tools: 29.0.3
node.js : 10.21.0
nativescript : 6.7.8

Error
Over the time we disabled all "optimize" features because all those seems to be bugged..
Since our version 0.3.2 we went forward and enabled .aab builds.

Now we get following error reports.

Fatal Exception: java.lang.UnsatisfiedLinkError
dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.xxx.mobile-tFMIkE3egIQbK2hZc5zevg==/base.apk"],nativeLibraryDirectories=[/data/app/com.xxx.mobile-tFMIkE3egIQbK2hZc5zevg==/lib/x86, /system/lib, /vendor/lib]]] couldn't find "libNativeScript.so"


Fatal Exception: java.lang.UnsatisfiedLinkError
dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.xxx.mobile-QNIyApCG7KlgDAGIJkBlmA==/base.apk"],nativeLibraryDirectories=[/data/app/com.xxx.mobile-QNIyApCG7KlgDAGIJkBlmA==/lib/arm64, /system/lib64, /vendor/lib64, /system/product/lib64]]] couldn't find "libNativeScript.so"

Theres not a single error in our build pipelines, but still the build process seems not to link the needed library correctly..
If the error rate increases further we also need to disable this again, truely disappointing.

To Reproduce
active aab build, deliver to customers

Expected behavior
not crashing

grafik

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从 Android AAB 构建和原生库打包路径入手,以报告的 java.lang.UnsatisfiedLinkError 和缺少 libNativeScript.so 作为失败点。通过启用 AAB 构建并将其交付到客户设备来复现;当生成的 AAB 包含所需的原生库,并且在报告的架构上不再崩溃时,即视为完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
android, cpp
领域
build-system, mobile
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。