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

【开源1300】预览版CP白屏报错 #666

Open
lishengjie123 opened this issue Mar 25, 2024 · 2 comments
Open

【开源1300】预览版CP白屏报错 #666

lishengjie123 opened this issue Mar 25, 2024 · 2 comments

Comments

@lishengjie123
Copy link

【前置条件】 使用小米手机
【测试版本】 开源预览版:https://github.com/hapjs-platform/hapjs/releases/download/1.30.0.0/hapjs_platform_preview_release_v1.30.0.0.apk
【测试环境】
【复现步骤】
1.打开乐听头条打开显示空白页
2.打开美团团购打开提示报错
【预期结果】
1.正常
2.正常
【实际结果】
1.乐听头条打开显示空白页
2.美团团购打开提示报错

charles-chai added a commit to charles-chai/hapjs that referenced this issue Mar 25, 2024
@charles-chai
Copy link
Contributor

核心问题在于MetaDataSetImpl中没有把对应的feature包含进去。

打包相关逻辑:

1、执行 assemblePhoneRelease 时会搜集所有task并执行(此处执行未必会按顺序)

有两个关键task:compilePhoneReleaseJavaWithJavac 、packagePhoneReleaseAssests.

compilePhoneReleaseJavaWithJavac执行会在 generate/hap目录下生成对应 feature_extension.json文件;

packagePhoneReleaseAssests task会把这个文件拷贝至 intermediates/hap目录下。

2、接下来会由quickapp/gradle-plugin 中的工具进行下一步处理,生成对应的 MetaDataSetImpl.java 文件

此时会从intermediates/hap目录下去找对应的feature_extension.json。

3、由于执行顺序异常,先执行了packagePhoneReleaseAssests task,没有拷贝文件成功,所以会出现以上问题。

Zhuyongjun-OPPO pushed a commit that referenced this issue Mar 26, 2024
@lishengjie123
Copy link
Author

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

2 participants