“不幸的是,应用程序已停止"在 Android 上构建 React Native 项目时出错 [英] "Unfortunately, app has stopped" error with building React Native project on Android
问题描述
我正在尝试运行一个用 React Native 编写的项目,但应用程序崩溃了:
I'm trying to run a project written in React Native and the app crashes:
此线程上所述的解决方案无关紧要,因为 enableProguardInReleaseBuilds 变量是已配置为 false.
The solution stated on this thread is irrelevant since the enableProguardInReleaseBuilds variable is already configured to false.
我也遇到了 RCT Video 的问题,通过 这个主题 所以也许它是相关的.
I've also had problems with RCT Video, solved with this thread so maybe it's related.
提前致谢.
推荐答案
在Android Studio中调试后解决.
Solved after debugging in Android Studio.
我遇到的错误(java.lang.ClassCastException: android.app.Application cannot be cast to com.facebook.react.ReactApplication)已通过 greena13 对此线程的回答.
The error I had (java.lang.ClassCastException: android.app.Application cannot be cast to com.facebook.react.ReactApplication) was solved with greena13's answer on this thread.
这篇关于“不幸的是,应用程序已停止"在 Android 上构建 React Native 项目时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!