【发布时间】:2020-07-17 19:17:25
【问题描述】:
我正在使用 react-native 开发 Android 应用程序。直到今天一切正常
步骤
- 我在官方 docs 之后添加了 Firebase => 我开始收到 dex 存档错误(64k 限制)
- 我通过这两个链接(docs 和 stackoverflow thread)修复了它
- 现在,当我运行
npx react-native run-android时,构建成功,但应用程序立即崩溃。
也许是重要说明:
- react-native 版本
0.61.5 - 我正在使用我在添加 Firebase 之前使用的同一台计算机和手机进行调试
- 在尝试之前,我在 firebase 中添加了 firebase crashalytics(始终使用 docs)
- 我在构建成功消息之前收到此警告,但我不知道它是否相关:
> Task :app:installDebug
07:48:13 V/ddms: execute: running am get-config
07:48:14 V/ddms: execute 'am get-config' on 'GBT4C18C21006873' : EOF hit. Read: -1
07:48:14 V/ddms: execute: returning
Installing APK 'app-debug.apk' on 'JSN-L22 - 10' for app:debug
07:48:14 D/app-debug.apk: Uploading app-debug.apk onto device 'GBT4C18C21006873'
07:48:14 D/Device: Uploading file onto device 'GBT4C18C21006873'
07:48:14 D/ddms: Reading file permision of /PATH/TO/PROJECT/android/app/build/outputs/apk/debug/app-debug.apk as: rw-r--r--
07:48:15 V/ddms: execute: running pm install -r -t "/data/local/tmp/app-debug.apk"
07:48:18 V/ddms: execute 'pm install -r -t "/data/local/tmp/app-debug.apk"' on 'GBT4C18C21006873' : EOF hit. Read: -1
07:48:18 V/ddms: execute: returning
07:48:18 V/ddms: execute: running rm "/data/local/tmp/app-debug.apk"
07:48:18 V/ddms: execute 'rm "/data/local/tmp/app-debug.apk"' on 'GBT4C18C21006873' : EOF hit. Read: -1
07:48:18 V/ddms: execute: returning
Installed on 1 device.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.5/userguide/command_line_interface.html#sec:command_line_warnings
【问题讨论】:
-
adb logcat并找到错误信息。 -
非常感谢,我在 crashalytics 中发现了错误,如果我能修复它,我会将其标记为已解决
标签: android firebase react-native