- You need an android emulator while developing, use geny-motion.
- Preferred editor is Visual Studio Code. Install Prettier - Code formatter plugin.
- Add following to workspace settings for auto-formatting on saving file.
{
"editor.formatOnSave": true
}
In the project directory, run the following
npm install -g expo-cli yarn
(install expo-cli & yarn)git clone [email protected]:linuxexp/matrimonial-fe.git
- Install android-sdk or (android-studio) if you don't already have. Make sure you're able to run
adb
on console. yarn install
- Make sure you've an emulator (geny-motion) or a device connected for testing
expo start
- Click on
Run on Android device/emulator
from the expo dashboard on your browser. Or press 'a' from the terminal.
- Download android-studio or android-sdk
- Set up the environment variable i.e
$ANDROID_HOME
On bash
based terminals, this can be set by adding android-sdk
path to ~/.bash_profile
.
For example if sdk path is /Users/home/Library/Android/sdk
export ANDROID_HOME=/Users/home/Library/Android/sdk
export PATH=$ANDROID_HOME/tools:$PATH
export PATH=$ANDROID_HOME/platform-tools:$PATH
-
Install Android phone image, recommended is
Google Nexus 7
API level22 (5.1v)
- If everything is properly configured you should see geny-motion device listed from
adb
in console.
From your android studio preference you'll find the android sdk
location
For every issue assigned, you should create a branch of the of the name PR-{issue_number}-some_name
.
Also provide the issue number in the commit as #{issue_number} some description
i.e
#23 fixed this and that
Once you're ready, you should raise a PR & add peers to review.
We use typescript moving forward, to familarize yourself with typescript,
https://basarat.gitbooks.io/typescript/content/docs/getting-started.html
Q: How do I install Genymotion?
A: Go to the Genymotion website and download Genymotion with VirtualBox. Follow the installation procedure and create a new virtual device.
Q: How do I edit the workspace settings?
A: Go to the '.vscode' folder and add the entries to the 'settings.json' file.
Make sure you've android-sdk installed in your system.
You could run into multiple adb
issues,
- The
adb
server version is different thanadb
client version.
The root cause for this is, you might have multiple android-sdks installed (expo/android studio) and they have different adb versions in them.
What you need to do is
- Agree on to use either android-studio/expo android-sdk, find the path to it let's call it
/Users/home/Library/Android/sdk
. - Need to make sure
adb
binary under this path is accessible from thePATH
. On bash based terminals, this can be done by updating~/.bash_profile
export ANDROID_HOME=/Users/home/Library/Android/sdk
export PATH=$ANDROID_HOME/tools:$PATH
export PATH=$ANDROID_HOME/platform-tools:$PATH
Add steps for updating window's environment variables
- Point Genymotion,
adb
path to/Users/home/Library/Android/sdk
. - Now that expo (from PATH) and geneymotion are using same adb, it should work.
- Obtain FCM server key
expo push:android:upload --api-key <your-token-here>
- use node 12 -
sudo n 12.0.0.1
- use latest expo-cli
sudo npm -g npm
andsudo npm -g expo-cli
- reinstall modules
yarn install
- Update
android version code
in app.json underexpo.android.versionCode
expo build:android -t app-bundle
-
expo build:android -t app-bundle --release-channel staging
-
expo build:android -t app-bundle --release-channel prod
-
expo build:ios --release-channel staging
expo publish --release-channel <staging|prod>
adb logcat *:S ReactNative:V ReactNativeJS:V