React Native expo go APP crashes on real device when install APK file

22 views Asked by At

Well, I already serach everywhere trying to find any solution that works for me and couldn't find anything...

My problem is I have this very simple QRCode scanner APP which works fine on development build, android emulator, on my android device through Expo GO, any error occurs... BUT when I run the eas build command using my "preview" setting on eas.json it builds de apk file for me and when I install it on my device the APP just don't open... actually it opens and close immediately and the worst thing is that I can't see any error, any log, nothing...

Here is my eas.json:

{
  "cli": {
    "version": ">= 5.4.0"
  },
  "build": {
    "development": {
      "developmentClient": true,
      "distribution": "internal",
      "android": {
        "buildType": "apk"
      },
      "channel": "development" 
    },
    "preview": {
      "android": {
        "buildType": "apk"
      },
      "channel": "preview"
    },
    "preview-internal": {
      "distribution": "internal",
      "android": {
        "buildType": "apk"
      },
      "channel": "preview"
    },
    "preview2": {
      "android": {
        "gradleCommand": ":app:assembleRelease"
      }
    },
    "preview3": {
      "developmentClient": true
    },
    "production": {}
  },
  "submit": {
    "production": {}
  }
}

Here is my app.json

{
  "expo": {
    "name": "QRCode Estou Nessa",
    "slug": "estounessa-qrcode",
    "version": "1.0.2",
    "privacy": "public",
    "platforms": [
      "android"
    ],
    "orientation": "portrait",
    "icon": "./assets/image/en-app-icon.png",
    "userInterfaceStyle": "light",
    "splash": {
      "image": "./assets/image/en-app-logo-splash.png",
      "resizeMode": "cover",
      "backgroundColor": "#363636"
    },
    "plugins": [
      [
        "expo-barcode-scanner",
        {
          "cameraPermission": "Allow $(PRODUCT_NAME) to access camera."
        }
      ]
    ],
    "assetBundlePatterns": [
      "**/*"
    ],
    "ios": {
      "supportsTablet": true,
      "infoPlist": {
        "NSCameraUsageDescription": "Allow $(PRODUCT_NAME) to access camera.",
        "NSMicrophoneUsageDescription": "Allow $(PRODUCT_NAME) to access your microphone"
      },
      "bundleIdentifier": "com.willianrbarbosa.estounessaqrcode",
      "runtimeVersion": {
        "policy": "appVersion"
      }
    },
    "android": {
      "adaptiveIcon": {
        "foregroundImage": "./assets/image/en-app-icon.png",
        "backgroundColor": "#363636"
      },
      "permissions": [
        "android.permission.CAMERA"
      ],
      "package": "com.willianrbarbosa.estounessaqrcode",
      "runtimeVersion": "1.0.0"
    },
    "extra": {
      "eas": {
        "projectId": "cdd5bad8-7330-42fd-9c97-93922ecc5a04"
      }
    },
    "updates": {
      "url": "https://u.expo.dev/cdd5bad8-7330-42fd-9c97-93922ecc5a04"
    }
  }
}

Here is my package.json

{
  "name": "estounessa-qrcode",
  "version": "1.0.2",
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo run:android",
    "ios": "expo run:ios",
    "web": "expo start --web"
  },
  "dependencies": {
    "@react-native-async-storage/async-storage": "1.18.2",
    "@react-native-community/masked-view": "^0.1.11",
    "@react-navigation/native": "^6.1.9",
    "@react-navigation/stack": "^6.3.19",
    "axios": "^1.6.1",
    "expo": "~49.0.15",
    "expo-barcode-scanner": "~12.5.3",
    "expo-dev-client": "~2.4.12",
    "expo-splash-screen": "~0.20.5",
    "expo-status-bar": "~1.6.0",
    "moment": "^2.30.1",
    "react": "18.2.0",
    "react-native": "0.72.10",
    "react-native-awesome-alerts": "^2.0.0",
    "react-native-gesture-handler": "~2.12.0",
    "react-native-paper": "^5.12.3",
    "react-native-reanimated": "~3.3.0",
    "react-native-safe-area-context": "4.6.3",
    "react-native-screens": "~3.22.0",
    "expo-updates": "~0.18.19"
  },
  "devDependencies": {
    "@babel/core": "^7.20.0"
  },
  "private": true
}

I'm need to fix it and I really don't know what it is to fix it...

I need to make this apk file from my project to install and run correctly on an android device.

0

There are 0 answers