Expo EAS build android APK crash on physical device (Expo 51)

I built eas build -p android –profile production(with Expo SDK 51, The build was successful without any problems). Then, I downloaded apk into physical device. When install and open it, the app crashes after showing splash screen.

There’s nothing wrong with the simulator and the expo go app

So I connected the physical device to the PC and tried again as below

1. eas build -p android --profile production --clear-cache
2. adb install -r MyApp.apk
3. adb logcat

But the app crashes after showing splash screen again.

I found exceptions in Logcat’s log as below.

06-18 15:16:23.359  1455  3526 W WindowManager: Exception thrown during dispatchAppVisibility Window{b491ce8 u0 com.myApp.MyApp/com.myApp.MyApp.MainActivity EXITING}

06-18 15:35:37.566  1455  1567 W PackageManager: java.lang.IllegalArgumentException: Unable to get package com.myApp.MyApp

06-18 15:35:38.323 18370 18370 W Finsky  : [2] aegq.b(126): STU: Failed to get storage stats for package 'com.myApp.MyApp' (1601: Error getting stats: android.content.pm.PackageManager.NameNotFoundException)

06-18 15:57:18.002 25857 25946 W GOS:PackageUtil: isPackageInstalledAsUser(). Exception: android.content.pm.PackageManager$NameNotFoundException: com.myApp.MyApp

06-18 15:57:53.221  1455  2981 W WindowManager: Exception thrown during dispatchAppVisibility Window{1ccb0a5 u0 com.myApp.MyApp/com.myApp.MyApp.MainActivity EXITING}

06-18 15:58:02.730  1455  6310 E AppOps  : java.lang.SecurityException: Specified package "com.myApp.MyApp" under uid -1 but it is not

06-18 16:06:54.320 26999 26999 E AppButtonsPrefCtl: Exception when retrieving package:com.myApp.MyApp

06-18 16:06:54.320 26999 26999 E AppButtonsPrefCtl: android.content.pm.PackageManager$NameNotFoundException: com.myApp.MyApp

06-18 16:06:54.537 18370 18612 W ResourcesManager: java.io.IOException: Failed to load asset path /data/app/~~DvIivdyMBKmqze5UOR38yA==/com.myApp.MyApp-djdb_-FbcxNuzhRd3BN9Dw==/base.apk

Can someone tell or direct or advice me?

Here is my app.json, eas.json and package.json

app.json

{
  "expo": {
    "name": "MyApp",
    "slug": "MyApp",
    "platforms": [
      "ios",
      "android"
    ],
    "version": "1.0.0",
    "orientation": "portrait",
    "icon": "./assets/images/icon.png",
    "scheme": "myapp",
    "userInterfaceStyle": "automatic",
    "splash": {
      "image": "./assets/images/splash.png",
      "resizeMode": "contain",
      "backgroundColor": "#ffffff"
    },
    "assetBundlePatterns": [
      "**/*"
    ],
    "ios": {
      "supportsTablet": true,
      "bundleIdentifier": "com.myApp.MyApp",
      "buildNumber": "1.0.0"
    },
    "android": {
      "adaptiveIcon": {
        "foregroundImage": "./assets/images/icon.png",
        "backgroundColor": "#ffffff"
      },
      "package": "com.myApp.MyApp",
      "versionCode": 1
    },
    "web": {
      "bundler": "metro",
      "output": "static",
      "favicon": "./assets/images/favicon.png"
    },
    "plugins": [
      "expo-router",
      "expo-font"
    ],
    "experiments": {
      "typedRoutes": true,
      "tsconfigPaths": true
    },
    "extra": {
      "router": {
        "origin": false
      },
      "eas": {
        "projectId": "xxxx-xxxx-xxxx-xxxx-xxxx"
      }
    }
  }
}

eas.json

{
  "cli": {
    "version": ">= 9.2.0"
  },
  "build": {
    "development": {
      "developmentClient": true,
      "distribution": "internal"
    },
    "preview": {
      "distribution": "internal"
    },
    "production": {
      "android": {
        "buildType": "apk"
      }
    }
  },
  "submit": {
    "production": {}
  }
}

package.json

{
  "name": "myApp",
  "main": "expo-router/entry",
  "version": "1.0.0",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web",
    "test": "jest --watchAll"
  },
  "jest": {
    "preset": "jest-expo"
  },
  "dependencies": {
    "@expo/vector-icons": "^14.0.0",
    "@react-native-async-storage/async-storage": "1.23.1",
    "@react-native-community/datetimepicker": "8.0.1",
    "@react-native-picker/picker": "2.7.5",
    "@react-navigation/native": "^6.0.2",
    "@supabase/supabase-js": "^2.43.1",
    "@tanstack/react-query": "^5.36.0",
    "expo": "^51.0.14",
    "expo-constants": "~16.0.2",
    "expo-device": "~6.0.2",
    "expo-font": "~12.0.7",
    "expo-linking": "~6.3.1",
    "expo-notifications": "~0.28.9",
    "expo-router": "~3.5.16",
    "expo-splash-screen": "~0.27.5",
    "expo-status-bar": "~1.12.1",
    "expo-system-ui": "~3.0.6",
    "expo-web-browser": "~13.0.3",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "react-hook-form": "^7.51.3",
    "react-native": "0.74.2",
    "react-native-elements": "^3.4.3",
    "react-native-modal-datetime-picker": "^17.1.0",
    "react-native-safe-area-context": "4.10.1",
    "react-native-screens": "3.31.1",
    "react-native-select-dropdown": "^4.0.1",
    "react-native-url-polyfill": "^2.0.0",
    "react-native-web": "~0.19.6"
  },
  "devDependencies": {
    "@babel/core": "^7.20.0",
    "@types/react": "~18.2.45",
    "jest": "^29.2.1",
    "jest-expo": "~51.0.1",
    "react-test-renderer": "18.2.0",
    "typescript": "~5.3.3"
  },
  "private": true
}

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật