jpush / jpush/jpush-react-native

react-native 0.70.6 打Release包生成的.apk文件,在Android 12 解析失败

Open
#901 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
1.4k
Forks
348
PR merge metrics
No merged PRs in 30d

Description

你的运行环境

  • 插件版本: "jcore-react-native": "^2.0.7", "jpush-react-native": "^2.9.7",
  • react-native 版本:0.70.6

期望效果

打包生成的apk文件,在Android 12版本的设备上正常打开

实际效果

在测试所有的Android设备上,Android 12打开出现apk文件解析失败,Android10、Android11正常

重现步骤

在模拟器测试如下,

  1. 创建了一个 Virtual device
image
  1. Make Project
image image
  1. Debug App
image

Android错误日志输出如下:

image
01/10 17:29:28: Launching 'app' on Pixel 6 API 31.
Installation did not succeed.
The application could not be installed: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED

List of apks:
[0] '/Users/gouxianguo/gxg/projects/cyborg/android/app/build/outputs/apk/debug/app-debug.apk'
Installation failed due to: 'Failed to commit install session 1381648148 with command package install-commit 1381648148. Error: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during installPackageLI: /data/app/vmdl1381648148.tmp/base.apk (at Binary XML file line #242): com.huawei.hms.support.api.push.PushMsgReceiver: Targeting S+ (version 31 and above) requires that an explicit value for android:exported be defined when intent filters are present'
Retry
Failed to launch an application on all devices

真机打开,安装apk文件,截图如下:

image

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the installation failure on the Pixel 6 API 31 emulator and inspect the generated android/app/build/outputs/apk/debug/app-debug.apk manifest. Check the com.huawei.hms.support.api.push.PushMsgReceiver entry identified in the error, and consider the work done when the APK installs successfully on Android 12 without the manifest parse failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, react-native
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.