Error type 3. Activity class {com.awesome_project/ com.awesome_project.MainActivity} does not exist in react native (Android device)

后端 未结 24 1541
甜味超标
甜味超标 2021-01-30 20:10

I\'ve created the project using the following command.

react-native init Awesome_Project

I\'ve started the packager using the following com

相关标签:
24条回答
  • 2021-01-30 20:17

    Sometimes you get this error because you don't uninstall another previous version of the app, on the LG phones you must go to app's on settings and uninstall the app, this happens to me.

    0 讨论(0)
  • 2021-01-30 20:17

    In my case.. none of the above solution worked. Then, i found the cause of it, i had previously installed application with same package name. I had uninstalled it from my phone, but as i have Oreo device.. it was installed in another user also. So, by uninstalling from all users.. solved my issue. It might not be helpful in your case.. but still this is my workaround.

    0 讨论(0)
  • 2021-01-30 20:18

    You may have deleted/uninstalled your app, but when you check in your settings/apps, you can see that it's not totally uninstalled.

    • Go to Settings.
    • Go to Apps.
    • Select your app. (here, you can verify that your app is not uninstalled properly).
    • Open the overflow menu on the top right and select Uninstall for all users. Done. Try to install then launch your app again.

    Source

    0 讨论(0)
  • 2021-01-30 20:19

    This issue occurred in my case when I uninstalled the app and tried installing with react-native run-android again.

    Following worked for me:
    1. Go to Application List from Settings Menu.
    2. You will see your application in the list with a message on the left side "App not installed for this user".
    3. Open that app in the settings, and then click on the top-right menu icon and select "Uninstall for all users". Hope it helps!

    0 讨论(0)
  • 2021-01-30 20:20

    In my case, I had the wrong package_name (client.client_info.android_client_info.package_name) in google-services.json (from Firebase). It had to match those four values as @parker mentioned.

    0 讨论(0)
  • 2021-01-30 20:22

    I solved it by installing the debug application manually on the mobile phone.

    To do so, go to [Project_Path]\android\app\build\outputs\apk\debug\app-debug.apk

    Copy this app-debug.apk to your mobile device.

    Now, just install it normally in your mobile and you are good to go.

    0 讨论(0)
提交回复
热议问题