0% found this document useful (0 votes)
40 views5 pages

NPX Create

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views5 pages

NPX Create

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

RUN avd

C:\Users\CAL-ON\AppData\Local\Android\Sdk\tools>emulator -list-avds

Pixel_XL_API_34

C:\Users\CAL-ON\AppData\Local\Android\Sdk\tools>emulator -avd Pixel_XL_API_34

npx create-expo-app AwesomeProject

cd AwesomeProject

npx expo start

Generate IOS and Android Files and Folders

npx react-native init YourProjectName

npx [email protected] init YourProjectName --version 0.73.6

fontAwesome

apply from: file("../../node_modules/@react-native-community/cli-platform-


android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)

Create android Project in java

npx [email protected] init AwesomeProject --version 0.72.10

non expo rest cache

npm start -- --reset-cache

Dependencies that are required for plugin to run Reanimated Babel plugin

 @babel/core, included in it as dependencies :


o @babel/traverse,
o @babel/generator,
 convert-source-map,
 @babel/preset-typescript,
 @babel/plugin-transform-shorthand-properties,
 @babel/plugin-transform-shorthand-properties,
 @babel/plugin-transform-arrow-functions,
 @babel/plugin-proposal-optional-chaining,
 @babel/plugin-proposal-nullish-coalescing-operator,
 @babel/plugin-transform-template-literals.

Run Andoird App

npx react-native run-android

error fixing

npx react-native doctor

gradlew assembleRelease

errors while assembleRelease

buildTypes {
...
release {
debuggable true
...
}
}

You should invoke ./gradlew bundleRelease for App bundles and ./gradlew assembleRelease
for APKs

1 .On windows cd android and then run gradlew assembleRelease in Editor Terminal or
Command Prompt in your project directory.

2 .Find APK at this location

android/app/build/outputs/apk/release/app-release-unsigned.apk
+++++++++++++++++++++++++++

WINDOWS USERS FOLLOW THESE INSTRUCTIONS ....IT WORKED FOR ME

Prerequisite - You must have a keystore file, If you don't have then Open cmd run keytool
-genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -
keysize 2048 -validity 10000 follow instructions and you are done.You will have a
keystore file. Now follow these steps.

1 .On windows cd android and then run gradlew assembleRelease in Editor Terminal or
Command Prompt in your project directory.

2 .Find APK at this location

android/app/build/outputs/apk/release/app-release-unsigned.apk

3 .Copy this APK to bin folder of jdk installation directory ( for me directory was C:\Program
Files\Java\jdk1.8.0_181\bin ) [ Basically in this step we are trying to go to the same
directory as jarsigner]

4 .Also Copy your keystore file to this ( C:\Program Files\Java\jdk1.8.0_181\bin )


directory.

5 .Now Open cmd in Administrator mode and run

cd C:\Program Files\Java\jdk1.8.0_181\bin

6 .Now run

jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore <<your


keystore file name >> <<your apk file name>> alias_name

Here goes your apk , now find your signed apk here cd C:\Program Files\Java\
jdk1.8.0_181\bin . Install it, Now it should install.
npx kill-port 3000
killall node

Run ReactNative in ADB

tsconfig.json

"forceConsistentCasingInFileNames": false, (project name problem)

Icons in react native

npm install react-native-vector-icons –save

npx pod-install

default packages for main screen to run


{
"name": "evTelematics",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"lint": "eslint .",
"start": "react-native start",
"test": "jest"
},
"dependencies": {
"@react-native-community/masked-view": "^0.1.11",
"@react-navigation/native": "^6.1.17",
"@react-navigation/stack": "^6.3.29",
"react": "18.2.0",
"react-native": "0.73.6",
"react-native-gesture-handler": "^2.16.0",
"react-native-reanimated": "^3.9.0",
"react-native-safe-area-context": "^4.10.1",
"react-native-screens": "^3.31.1"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@babel/preset-env": "^7.20.0",
"@babel/runtime": "^7.20.0",
"@react-native/babel-preset": "0.73.21",
"@react-native/eslint-config": "0.73.2",
"@react-native/metro-config": "0.73.5",
"@react-native/typescript-config": "0.73.1",
"@types/react": "^18.2.6",
"@types/react-test-renderer": "^18.0.0",
"babel-jest": "^29.6.3",
"eslint": "^8.19.0",
"jest": "^29.6.3",
"prettier": "2.8.8",
"react-test-renderer": "18.2.0",
"typescript": "5.0.4"
},
"engines": {
"node": ">=18"
}
}

You might also like