NativeScript / NativeScript/nativescript-cli

Error is: The parser encountered some structural problem in the manifest.

未关闭
#5,639 2 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

bug-pending-triage
主要语言
JavaScript
星标
1.1k
派生
204
平均合并
1 天 9 小时
30 天内合并 PR
8

描述

Issue Description

Run the app with ns run android

You ll get a cryptic error at the end

Unable to apply changes on device: emulator-5554. Error is: The parser encountered some structural problem in the manifest..

The log below shows the actual error which should be brought back up to the user:

INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during installPackageLI: /data/app/vmdl1130854405.tmp/base.apk (at Binary XML file line #30): com.tns.NativeScriptActivity: Targeting S+ (version 31 and above) requires that an explicit value for android:exported be defined when intent filters are present
Reproduction

Run an app with a manifest not ready for android S

Relevant log output (if applicable)
d/app/build/outputs/apk/debug/app-debug.apk"
Result when throw error is false:
{
  stdout: 'Performing Streamed Install\n',
  stderr: 'adb: failed to install /Volumes/dev/nativescript/nativescript-material-components/demo-vue/platforms/android/app/build/outputs/apk/debug/app-debug.apk: Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during installPackageLI: /data/app/vmdl1130854405.tmp/base.apk (at Binary XML file line #30): com.tns.NativeScriptActivity: Targeting S+ (version 31 and above) requires that an explicit value for android:exported be defined when intent filters are present]\n',
  exitCode: 1
}
Error name: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED result code: -108
The parser encountered some structural problem in the manifest.
Unable to apply changes on device: emulator-5554. Error is: The parser encountered some structural problem in the manifest..
Environment
npm ERR! cb.apply is not a function

npm ERR! A complete log of this run can be found in:
npm ERR!     /Volumes/data/mguillon/.npm/_logs/2022-03-02T20_01_11_386Z-debug.log
Install for [ 'nativescript-envinfo@latest' ] failed with code 1
Please accept these terms

贡献指南

打开贡献指南

从这里开始

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

调研方向

使用尚未准备好支持 Android S 的 manifest 运行报告中的 ns run android 命令,并将 CLI 输出与 issue 中显示的 adb stderr 进行比较。跟踪 INSTALL_PARSE_FAILED_MANIFEST_MALFORMED 结果被转换为通用 parser 消息的位置;当面向用户显示可采取行动的 Android 安装错误时即完成。

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

评估

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

把新 issue 发到你的邮箱

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