React native | Android | List all assets
In react native if you want to list all the assets (base directory files and folder), use the following in the onCreate method of MainApplication.java
In react native if you want to list all the assets (base directory files and folder), use the following in the onCreate method of MainApplication.java
Sync may be required Solution Delete .gradle folder (which is in project’s root folder), and in Android Studio, from File menu click “Sync Project with Gradle Files” option. Reason Once this happened to me after switching Git branches: In branch feature/a I had a Gradle module named a. In branch feature/b there was no module … Read more
Go to android project directory in terminal Run following in terminal It will give you SHA1 and SHA256 keys for each type of build.
Ideally you should do not it. But some Android APIs may need code to be run on main thread. e.g. MediaRouter In that you can use following way to run the code on main thread. Cheers and Peace out !!!
Use the following command for android and IOS when the emulator/simulator is running: For IOS just change the flag like below That’s it. Other way on IOS is sending a message in simulator and then clicking on that. But on android only https and http schemes can be tested with messaging app.
Use the following command to check the available devices: What you can do with the above is, while developing the react native apps, you may want to select specific device and IOS version. So, you could use it like: This way you will have full control for the device to test on.
Delete the following folder: ~/Library/Application Support/Google/AndroidStudio4.1 Please check for the version in name ‘AndroidStudio4.1′, as it could be different depending on which version you are using. You may also find folders with older Android Studio versions.
Go to SDK manager => Appearance and Behavious => System Settings => Android SDK => and install NDK side by side. It could be tricky to find the compatible version with your application. For android API level 29, version 20.1.5948944 worked. So, if you are trying some older API level you should try some older … Read more
I hope you have installed android studio, SDKs and Tools for your platform as specified on React native ‘get started’ guide. Now start your app in debugging mode. It should run you app in the android emulator that you are running. Open android studio. Select the ‘Profile or Debug APK’ option from right side key … Read more