Problem initializing project in ReactNative CLI - android

My name is fernando and I'm studying mobile development via React Native
I'm having trouble using the React Native CLI, as I couldn't solve this problem I decided to do all the steps from the recommended https://reactnative.dev/docs/environment-setup again to run the code.
I uninstalled Java, node, Android Studio, JDK and gradle.
I installed Java, Node and Java using Chocolatey as recommended by the documentation, I strictly performed all the steps requested but I cannot install the application on the simulator or on the cell phone via USB
Starts NPM START normally without errors.
But when starting NPM RUN ANDROID it gives me the following error
enter image description here
OBS:
The project in question in the image, has no code, it was only opened using npx react-native init AwesomeProject
Another observation that I can run and program using React native EXPO GO
It works without errors and I can run both in the simulator and in USB
Thank you and I would appreciate it if someone could help me

Related

react-native-google-mobile-ads with Expo managed workflow will not work

I have followed all of the most up-to-date guides and suggestions for getting react-native-google-mobile-ads to work with an Expo managed workflow, including these:
How to use react-native-google-mobile-ads with Expo?
How do I use react-native-google-mobile-ads with Expo and Expo Go?
But I keep getting the same error:
ERROR TypeError: null is not an object (evaluating 'RNAppModule.eventsNotifyReady')
It would seem that this error originates in this jest.setup.ts file:
https://github.com/invertase/react-native-google-mobile-ads/blob/main/jest.setup.ts
but I have no idea what the error is or how to overcome it.
This error happens when I initiate interstitial.load() as per the official documentation.
Any help would be greatly appreciated.
Ran into this same problem. Turns out the command to use was hidden in their docs at the end of the build steps without any explanation.
https://docs.page/invertase/react-native-google-mobile-ads#setting-up-google-admob
Using react-native-google-mobile-ads, Expo Go will no longer be able to handle linking all the native dependencies. So you'll have to use EAS to build it. Per the docs, you can use npx eas-cli build --profile development to build for development. Alternatively, to install locally rather than on EAS servers, add the --local flag to that command. Just note that if building locally you may need to set the Android SDK path following the instructions to edit your eas.json at Expo build EAS - local - SDK location not found.
After building for Android (I don't have a Mac so I can't speak for development on iOS), it generates an apk which you need to install on your device. I'm sure there's a way to install this on an emulator too.
Once you've opened that app, it will direct you to start a development server using expo start --dev-client. This will run a dev server similar to the usual Expo Go. It pulls up a QR code which you can scan and it will take you into your app. Hot reload works as expected too. Doing this my test banner ad showed up without any errors.
The same solution is discussed here.

Problem compiling Ionic (Angular) app in Android

I have an app made in Ionic5 framework with the support of Angular, when I run ionic serve --lab, the android app works without problem but the problem is that when I export the project to Android Studio with (ionic capacitor copy android) and I run the app on my device suddenly crashes and stops.
I have been looking for information but I have not found any useful data. My question is more generic than this platform is used to. What error detecting techniques I should use (Android Studio, npm vulnerabilities) and what are some typical cases that generate this error?
I let some posible useful project data:
I use Firebase for database and back-end services.
NPM warn me due to the fact that I have 10 vulnerabilities.
Ther could be a number of reasons for this.
Try running opening chrome://inspect/#devices where you can select your device and see all console logs.
Also try syncing your gradle files in android studio

React Native without Android Studio?

Is there any way to develop a React Native app for Android without installing Android Studio ?
On Ubuntu 18.04 the apt command proposes a lot of android packages: android-sdk, android-sdk-platform-tools etc...
What do I need exactly to get React Native working properly ?
Please don't use expo or another SDKs of react native. React Native CLI is recommended everywhere because its performance is not comparable to expo and it is much more lightweight! Android Studio is just an IDE! If you setup your android development environment correctly there is no need to install Android Studio IDE (This is for experts!) but it is recommended to install for amateur users.
If you don't want to use the Android studio, you can take advantage of the Expo. Expo is the best way to assist React-native. You can run the app without the Android studio, and when you refresh, you can see the modified code right away.
Look at this official document and follow it slowly.
you don't need Android Studio at all, if you are using react native cli you can install it on your phone and run it there.
An attempt of solution to use react native without android studio and without expo is to build directly in your device.
you must install adb first by following this link install-adb-fastboot-on-ubuntu 18.04
and then you should follow this link react-native running-on-device
It will help you.
I'm using usb cable to install debug apk in my phone (react-native run-android). I put my phone in the same network (WIFI) with my machine (server) and configure the server address and port to debug remotely in the phone. After that i remove the usb cable.
In short everything is explained on the link above

How to install react native app into my own smartphone device

I am currently learning mobile app development by using react native. I am using 'EXPO CLI' to simulate the code on my device/emulator. However, after reading the react-native official documentation, I realize that the steps required 'Android' folder in my project that does not exist because I did not run 'npm run eject'.
May I know is there any source on how to install my app into my device locally?
(Meaning no longer running the app through EXPO).

Difference between PhoneGap and Cordova and which one should we install?

I have been tasked with developing an Android and iOS application with PhoneGap (http://phonegap.com/)
However, as I read, things start to get really complicated: Some people say Cordova (http://cordova.apache.org/) is now PhoneGap, others say PhoneGap is just a distribution of PhoneGap.I lost 3 days and still can't find a proper way or a guide to install a fully functional PhoneGap plugin either in Eclipse or Netbeans running Ubuntu 12.04 64-bit.
What I tried:
1. Installing Eclipse, installing MDS AppLaud Phonegap Plugin (http://marketplace.eclipse.org/content/applaud-phonegap-android-jslintjshint#.Utf1JPiSTh8). This one actually installed at once, and it actually lets me create a new PhoneGap project in Eclipse, however, the I cannot select any SDK different than 4.4. (?!)
2. Installed NetBeans and after I tried to install phonegap and cordove through nodeJS it failed, again.
My question is:
Which one I should install and how to do it in Ubuntu, using either Eclipse of NetBeans?!
Edit:
OK guys, I just found out how to install nodeJS and PhoneGap on Ubuntu 12.04: http://paste2.org/1OnX6M6F . Still trying to integrate it in some IDE for the real thing, though!
If you want to basically start developing an app, I suggest this for PhoneGap:
These are the steps I used to install PhoneGap on Ubuntu. Take note, this is for PhoneGap version 2.8.1. Personally I was not able to get nodeJS to install the latest. If you need the latest to be installed, check around on google. Referencing This tutorial.
Step 1
Install Java 7 JDK
Step 2
Install ANT
Step 3
Download & Extract PG v2.8.1
Step 4
Download Android SDK
Step 5
Set up environment variables
Step 6
Create base project
./create location/to/put/project package_name project_name
Step 7
Import Project into Eclipse
File->New->Android->Android Project From Existing Code
Browse to where you placed the project and select it
Now you can start developing.
Reminder: This is the way to do it for v2.8.1 of PhoneGap. Different versions(especially 3.*) will be different (nodeJS)
Look at http://docs.phonegap.com. Read the "Overview chapter, then "Platform Guides" and "The Command-Line Interface". Follow the steps and in the end you should be able to build your app. It takes a while but it's worth it.
I havn't integrated cordova/phonegap in my IDE. I just created the app with the command line interface. In netbeans I created a HTML5 project and linked the app-root/www directory into this project. I'm programming with Netbeans and building and running the app with the command line interface. That's all.
In order to have some code completion, I have written an extra class (facade) which encapsulates the phonegap code. It just delegates its calls to the phonegap API. That is especially nice if the phonegap API changes as it only affects my code in that particular facade class.
The last thing I want to share: I found out that the build and run process with the command line interface is pretty slow. Executing cordova prepare android and then running the android project in Eclipse/ADT is a lot faster.
OK, to put it simple:
PhoneGap - The original project developed by volunteers
Cordova - The Apache's version of Phonegap, which has exactly the same documentation and functionality as the original PhoneGap but is integrated in NetBeans 7.4.

Categories

Resources