Skip to content

Instantly share code, notes, and snippets.

View imamjnn's full-sized avatar

imam jinani imamjnn

View GitHub Profile
yarn add --dev babel-plugin-module-resolver

tsconfig.json

// prettier-ignore
{
  "extends": "@tsconfig/react-native/tsconfig.json",     /* Recommended React Native TSConfig base */
{
data: [
{
status: "",
cctv_id: "1",
site_id: null,
site_name: "Ancol-001-701002_1",
target_view: "",
url: "http://cctv.balitower.co.id:80/Ancol-001-701002_1/embed.html?proto=hls",
rtmp: "rtmp://cctv.balitower.co.id:1935/static/Ancol-001-701002_1",

Error: While resolving module react-native-vector-icons/FontAwesome

rm ./node_modules/react-native/local-cli/core/__fixtures__/files/package.json
react-native run-android

Unable to load script from assets index.android.bundle

mkdir android/app/src/main/assets
react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res

Untuk mengecek config

git config --global --list
npm config list

Set proxy npm

npm config set proxy http://proxy:8080
npm config set https-proxy http://proxy:8080
  • Edit styles.xml on res/values
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
      <!-- Customize your theme here. -->
      <item name="colorPrimary">@color/purple</item> <!--change default color. -->
      <item name="colorAccent">@color/purple</item>
</style>
  • Create file splash_screen.xml in res/drawable
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:drawable="@color/purple"/>
    <item>
        <bitmap
            android:gravity="center"
            android:src="@mipmap/ic_launcher"/>