jpush / jpush/jpush-react-native
google play 版Error: Program type already present: cn.asus.push.BuildConfig
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.4k
- Forks
- 348
- PR merge metrics
- No merged PRs in 30d
Description
你的运行环境
- 插件版本:
- react-native 版本:0.62
"jcore-react-native": "^1.8.0",
"jpush-react-native": "^2.8.1",
google play无法审核通过,于是我把本地node_modules/jcore-react-native/android/libs
和node_modules/jcore-react-native/libs目录下的.jar .so删除,在把从官网下载google play版本,压缩包里面的.jar,和.so分别
放到node_modules/jcore-react-native/android/libs和node_modules/jcore-react-native/lib的对应位置,接着运行npx react-native run-android ,但是编译报错
Caused by: com.android.tools.r8.utils.AbortException: Error: Program type already present: cn.asus.push.BuildConfig
at com.android.tools.r8.utils.Reporter.a(:21)
at com.android.tools.r8.utils.Reporter.a(:7)
at com.android.tools.r8.utils.t.a(:36)
... 36 more
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:mergeExtDexDebug'.
重现步骤
- 本地node_modules/jcore-react-native/android/libs
和node_modules/jcore-react-native/libs目录下的.jar .so删除 - 从官网下载google play版本,压缩包里面的.jar,和.so分别
放到node_modules/jcore-react-native/android/libs和node_modules/jcore-react-native/lib的对应位置
运行npx react-native run-android ,但是编译报错
Debug logs
包括 Android 或 iOS 的日志:
Caused by: com.android.tools.r8.utils.AbortException: Error: Program type already present: cn.asus.push.BuildConfig
at com.android.tools.r8.utils.Reporter.a(:21)
at com.android.tools.r8.utils.Reporter.a(:7)
at com.android.tools.r8.utils.t.a(:36)
... 36 more
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:mergeExtDexDebug'.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting the JAR and SO files under node_modules/jcore-react-native/android/libs and node_modules/jcore-react-native/libs, then compare the downloaded Google Play artifacts with the existing package contents. Reproduce the failure with npx react-native run-android and trace which artifacts provide cn.asus.push.BuildConfig. Done means the Android build no longer fails at :app:mergeExtDexDebug.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java, react-native
- Domain
- build-system, mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100