App created using React-native runs with errors on Android studio and hangs on an USB Samsung Phone

I used to be Windows Phone developer and have worked on Intel’s Mobile software in the past.

Created an app using React-native. The folder structure in the image.
It could run the app using React-Native.
I tried to open it and build it in Android studio snow-cat. There were build errors mostly in the manifest file.
Then I downloaded Expo as I had tried Expo client on my Android Phone.
However when I tried to run it on the connected device (Android phone Samsung 21+ USB), the Loading… starts on the phone but does not result in any view.
How can I fix this?

Hey @mysorian, I’m not positive that I’m following along correctly but it sounds like you’re trying to run a bare/pure react-native project in Expo Go which is not expected to work. You’d need to build a custom dev client via EAS to be able to achieve that type of workflow. Introduction - Expo Documentation

Cheers,
Adam

I started from Expo.
C:\Reactive-native>expo init AwesomeProject
√ Choose a template: » minimal bare and minimal, just the essentials to get you started
√ Downloaded and extracted project files.
:package: Using npm to install packages.
√ Installed JavaScript dependencies.
√ Skipped installing CocoaPods because operating system is not on macOS.

:white_check_mark: Your project is ready!

To run your project, navigate to the directory and run one of the following npm commands.

  • cd AwesomeProject
  • npm run android
  • npm run ios # you need to use macOS to build the iOS project - use managed workflow if you need to do iOS development without a Mac
  • npm run web

:bulb: You can also open up the projects in the ios and android directories with their respective IDEs.
:rocket: expo-updates (​https://github.com/expo/expo/blob/master/packages/expo-updates/README.md​) has been installed in your project. Before you do a release build, you’ll need to configure a few values in Expo.plist and AndroidManifest.xml in order for updates to work.

C:\React-native\AwesomeProject>npm run android

awesomeproject@1.0.0 android
expo run:android

** :hot_face:** and no emulators could be started automatically.
Please connect a device or create an emulator (Android Studio Emulator - Expo Documentation). (SAMSUNG Galaxy S21+ is Connected. It starts to load on the phone and hangs!)
Then follow the instructions here to enable USB debugging:
Cómo ejecutar apps en un dispositivo de hardware  |  Android Studio  |  Android Developers. If you are using Genymotion go to Settings → ADB, select “Use custom Android SDK tools”, and point it at your Android SDK directory.
Error: No Android connected device found, and no emulators could be started automatically.
Please connect a device or create an emulator (Android Studio Emulator - Expo Documentation).
Then follow the instructions here to enable USB debugging:
Cómo ejecutar apps en un dispositivo de hardware  |  Android Studio  |  Android Developers. If you are using Genymotion go to Settings → ADB, select “Use custom Android SDK tools”, and point it at your Android SDK directory.
at Object.getAllAvailableDevicesAsync (c:\Users\TestUser\AppData\Roaming\npm\node_modules\expo-cli\node_modules\xdl\src\Android.ts:117:11)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at ensureEmulatorOpenAsync (c:\Users\TestUser\AppData\Roaming\npm\node_modules\expo-cli\src\commands\run\android\resolveDeviceAsync.ts:9:21)
at resolveDeviceAsync (c:\Users\TestUser\AppData\Roaming\npm\node_modules\expo-cli\src\commands\run\android\resolveDeviceAsync.ts:23:12)
at resolveOptionsAsync (c:\Users\TestUser\AppData\Roaming\npm\node_modules\expo-cli\src\commands\run\android\runAndroid.ts:71:18)
at actionAsync (c:\Users\TestUser\AppData\Roaming\npm\node_modules\expo-cli\src\commands\run\android\runAndroid.ts:139:17)