Metourni / CountriesApp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Countries app

React Native countries listing app.

Version

Version Betta

Features

Perspectives

  • Pagination
  • More filters

Env

node -v
v12.14.1
npm -v
6.13.4

Setup

  1. Clone the project:
git colne https://github.com/Metourni/CountriesApp.git
  1. Install dependencies:

If you're using npm run the cmd:

npm install

If you're using yarn run the cmd:

yarn install
  1. Config the environment :
// In the file : app/config/index.js
  export const {
      api:{
          // ....
      }
  }
  1. Run the project:

If you're using android run the cmd:

npx react-native run-android

or

 npx yarn android

If you're using ios run the cmd:

npx react-native run-ios

or

 npx yarn ios

Build

  1. Create and then copy a keystore file to android/app: Change the value between {} to whatever you want
  keytool -genkey -v -keystore {mykeystore}.keystore -alias {mykeyalias} -keyalg RSA -keysize 2048 -validity 10000
  1. Setup your gradle variables in android/gradle.properties:
  MYAPP_RELEASE_STORE_FILE=mykeystore.keystore
  MYAPP_RELEASE_KEY_ALIAS=mykeyalias
  MYAPP_RELEASE_STORE_PASSWORD=*****
  MYAPP_RELEASE_KEY_PASSWORD=*****
  1. Add signing config to android/app/build.gradle if not exist:
  android {
      signingConfigs {
          release {
              storeFile file(MYAPP_RELEASE_STORE_FILE)
              storePassword MYAPP_RELEASE_STORE_PASSWORD
              keyAlias MYAPP_RELEASE_KEY_ALIAS
              keyPassword MYAPP_RELEASE_KEY_PASSWORD
          }
      }
      buildTypes {
          release {
              signingConfig signingConfigs.release
          }
      }
  }
  1. Generate your release APK:
  cd android && ./gradlew assembleRelease

or

  npm run apk

or

  yarn apk
  1. If error check this: If you you got: Error: Duplicate resources check this solution
    facebook/react-native#22234 (comment)

  2. If you want to build bundle

  cd android && ./gradlew bundleRelease
  1. Testing the release build of your app
  react-native run-android --variant=release

Screens

License

[Duplicate resources issues solution] [facebook/react-native#22234 (comment)]

About


Languages

Language:JavaScript 53.6%Language:Java 19.1%Language:Objective-C 13.1%Language:Ruby 11.7%Language:Starlark 1.8%Language:TypeScript 0.8%