极光切公有云之鑫联盟Android
极光切公有云接入鑫联盟出现的问题
运行环境:
- "react-native": "0.59.10",
- "jcore-react-native": "2.2.3",
- "jpush-react-native": "3.1.2",
Android 环境
- distributionUrl=https://mirrors.cloud.tencent.com/gradle/gradle-6.2-bin.zip
- classpath("com.android.tools.build:gradle:3.6.4")
构建时出现的问题
- 不支持namespace;
报错信息:
Build file '/Volumes/Samsung/sxf/rn/uxlm-app/node_modules/jpush-react-native/android/build.gradle' line: 10
A problem occurred evaluating project ':jpush-react-native'.
Could not find method namespace() for arguments [cn.jiguang.plugins.push] on extension 'android' of type com.android.build.gradle.LibraryExtension.
-
Try: Run with --info or --debug option to get more log output. Run with --scan to get full insights.
-
Exception is: org.gradle.api.GradleScriptException: A problem occurred evaluating project ':jpush-react-native'.
处理办法:注释掉
运行 App 时出现的问题
- packageName 获取不到;
Caused by: java.lang.RuntimeException: Cannot read packageName from /Volumes/Samsung/sxf/rn/uxlm-app/node_modules/jpush-react-native/android/src/main/AndroidManifest.xml
定义package="com.suixingpay.tssapp",会报如下错误:
Type com.suixingpay.tssapp.BuildConfig is defined multiple times: /Volumes/Samsung/sxf/rn/uxlm-app/android/app/build/intermediates/mixed_scope_dex_archive/devDebug/out/com/suixingpay/tssapp/BuildConfig.dex, /Volumes/Samsung/sxf/rn/uxlm-app/android/app/build/intermediates/mixed_scope_dex_archive/devDebug/out/94014fa2f8dbb5fffcb8d061b5a179ca085642193f39b3ca55a3ec960366a279_1.jar:classes.dex**
- js调用报错:
TypeError: _jpushReactNative.default.init is not a function
- JCore 错误
2024-11-29 18:00:06.100 9230-22686 JIGUANG-JCore com.suixingpay.tssapp E [CheckManifestHelper] [key-step]errorcode:10001,metadata: JCore appKey - not defined in manifest