Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android.app.Application cannot be cast to com.facebook.react.ReactApplication

Tags:

react-native

I have use this command on my project:

react-native upgrade

And I'm getting the error when I try to build the app:

android.app.Application cannot be cast to com.facebook.react.ReactApplication

I really don't know how to fix that. Any tip?

like image 913
LuisPinto Avatar asked Sep 06 '16 09:09

LuisPinto


People also ask

Will Facebook stop supporting react native?

As of January 19, 2021, Facebook React Native SDK will no longer be officially supported by Facebook.

Does Facebook support react?

React is one of Facebook's first open source projects that is both under very active development and is also being used to ship code to everybody on facebook.com.

How do you cast an activity?

Adding the Cast buttonA Cast-enabled application displays the Cast button in each of its activities. Clicking on the Cast button displays a list of Cast devices which a user can select. If the user was playing content locally on the sender device, selecting a Cast device starts or resumes playback on that Cast device.


1 Answers

Adding the following to AndroidManifest.xml should solve the error:

 <application
   android:name=".MainApplication"
like image 72
Jon Senra Avatar answered Dec 28 '22 11:12

Jon Senra