世博会项目在 Expo go 中工作,但在移动设备中创建时无法工作 apk/ipa [已关闭]

Expo project working in Expo go but not working when in mobile when created apk/ipa of it [closed]

提问人:VALIVETI SWAMY NAGA SAI NIVAS 提问时间:11/17/2023 更新时间:11/17/2023 访问量:29

问:


想改进这个问题吗?通过编辑这篇文章添加详细信息并澄清问题。

5天前关闭。

我创建了一个 Expo 应用程序,它在 Expo Go 应用程序中运行良好,但在创建项目的 apk 并尝试在 android 移动中运行后,启动画面正在打开,然后它自行关闭。无论我尝试打开应用程序多少次,但我仍然遇到相同的错误。

这是我的app.json文件

{
  "expo": {
    "name": "Meal Village for Drivers",
    "slug": "meal-village-for-drivers",
    "version": "4.2.0",
    "orientation": "portrait",
    "icon": "./assets/driver.png",
    "userInterfaceStyle": "light",
    "splash": {
      "image": "./assets/splash.png",
      "resizeMode": "contain",
      "backgroundColor": "#ffffff"
    },
    "updates": {
      "fallbackToCacheTimeout": 0
    },
    "assetBundlePatterns": ["**/*"],
    "ios": {
      "supportsTablet": true,
      "infoPlist": {
        "NSLocationWhenInUseUsageDescription": "...",
        "NSLocationAlwaysAndWhenInUseUsageDescription": "...",
        "NSLocationAlwaysUsageDescription": "...",
        "isIosBackgroundLocationEnabled": true,
        "UIBackgroundModes": ["location", "fetch"],
        "LSApplicationQueriesSchemes": ["geo", "wage", "wego", "maps"],
        "buildNumber": 30
      },
      "bundleIdentifier": "mealvillage.driver"
    },
    "android": {
      "adaptiveIcon": {
        "foregroundImage": "./assets/driver.png",
        "backgroundColor": "#FFFFFF"
      },
      "permissions": [
        "INTERNET",
        "ACCESS_COARSE_LOCATION",
        "ACCESS_FINE_LOCATION",
        "ACCESS_BACKGROUND_LOCATION"
      ],
      "package": "mealvillage.driver",
      "versionCode": 30
    },
    "web": {
      "favicon": "./assets/driver.png"
    },
    "extra": {
      "eas": {
        "projectId": "e4cecb9f-ffd8-445c-bc3e-002e8071a410"
      }
    },
    "owner": "nivas1"
  }
}

这是我的eas.json文件

{
  "build": {
    "preview": {
      "android": {
        "buildType": "apk"
      },
      "channel": "preview"
    },
    "preview2": {
      "android": {
        "gradleCommand": ":app:assembleRelease"
      },
      "channel": "preview2"
    },
    "preview3": {
      "developmentClient": true,
      "channel": "preview3"
    },
    "production": {
      "channel": "production"
    }
  }
}

react-native expo-go

评论

0赞 Vicky Ahuja 11/17/2023
我猜有一个运行时崩溃,我们在这里可以做的是打开 android studio 和 logcat,连接设备并打开应用程序并检查那里的崩溃日志。您将获得崩溃的实际原因。

答: 暂无答案