【发布时间】:2017-11-24 18:26:36
【问题描述】:
我在一个干净的应用程序中测试了这个包,它工作正常,但是当我尝试将 pushwoosh-react-native-plugin 添加到现有应用程序时,它会在启动时关闭并且永远不会触发错误在 Firebase 崩溃报告中。
我怀疑可能与 react-native-google-analytics-bridge 或 react-native-firebase 软件包有冲突,但无法解决任何问题。 p>
应用在 Android 和 iPhone 模拟器中崩溃。
这是 my packages.json 文件的内容:
{
"name": "Myapp",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"MD5": "^1.3.0",
"moment": "^2.18.1",
"native-base": "^2.3.2",
"pushwoosh-react-native-plugin": "^3.1.0",
"react": "16.0.0-alpha.12",
"react-native": "0.48.3",
"react-native-fetch-blob": "^0.10.8",
"react-native-firebase": "^3.0.3",
"react-native-google-analytics-bridge": "^5.3.3",
"react-native-htmlview": "^0.12.0",
"react-native-img-cache": "^1.4.0",
"react-native-offline": "^3.1.1",
"react-native-progress": "^3.4.0",
"react-native-timeago": "^0.3.0",
"react-native-video": "^2.0.0",
"react-navigation": "^1.0.0-beta.11",
"rn-placeholder": "^1.0.1"
},
"devDependencies": {
"babel-jest": "21.0.2",
"babel-preset-react-native": "4.0.0",
"jest": "21.1.0",
"react-test-renderer": "16.0.0-alpha.12"
},
"jest": {
"preset": "react-native"
}
}
这是我的 android/build.gradle 中的依赖项:
dependencies {
compile (project(':pushwoosh-react-native-plugin'))
{
exclude group: 'com.google.android.gms'
}
compile (project(':react-native-google-analytics-bridge'))
{
exclude group: 'com.google.android.gms'
}
compile(project(':react-native-firebase')) {
transitive = false
exclude group: 'com.google.android.gms'
}
compile ("com.google.android.gms:play-services-base:11.4.2"){
force = true;
}
compile("com.google.android.gms:play-services-analytics:11.4.2"){
force = true
}
compile ("com.google.firebase:firebase-core:11.4.2"){
force = true;
}
compile 'com.google.firebase:firebase-crash:11.4.2'
compile "com.google.firebase:firebase-analytics:11.4.2"
compile project(':react-native-fetch-blob')
compile project(':react-native-video')
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:26.0.1"
compile "com.facebook.react:react-native:+" // From node_modules
}
【问题讨论】:
-
请在启动应用程序后立即发布 logcat 的输出
标签: firebase react-native google-analytics pushwoosh