首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >世博园区无装船

世博园区无装船
EN

Stack Overflow用户
提问于 2022-06-30 19:39:59
回答 2查看 301关注 0票数 0

我构建了一个expo应用程序,在开发过程中它运行得很好(我使用expo run:android运行这个应用程序),但是当我生成apk并安装它时,它就不工作了。该应用程序从不加载,只需显示世博会屏幕。有人知道这里发生了什么吗?

我的apk:https://exp-shell-app-assets.s3.us-west-1.amazonaws.com/android/%40anti-duhring/sleeper-app-28be24ca7f74428db0b59af74750d82b-signed.apk

app.json:

代码语言:javascript
复制
{
  "expo": {
    "name": "sleeper-app",
    "slug": "sleeper-app",
    "version": "1.0.0",
    "orientation": "portrait",
    "icon": "./assets/icon.png",
    "userInterfaceStyle": "light",
    "splash": {
      "image": "./assets/splash.png",
      "resizeMode": "contain",
      "backgroundColor": "#ffffff"
    },
    "updates": {
      "fallbackToCacheTimeout": 0
    },
    "assetBundlePatterns": [
      "**/*"
    ],
    "ios": {
      "supportsTablet": true
    },
    "android": {
      "adaptiveIcon": {
        "foregroundImage": "./assets/adaptive-icon.png",
        "backgroundColor": "#FFFFFF"
      },
      "package": "com.antiduhring.sleeperapp"
    },
    "web": {
      "favicon": "./assets/favicon.png"
    }
  }
}

逻辑猫:

代码语言:javascript
复制
06-30 17:36:28.964 13688 14145 W System.err: java.io.FileNotFoundException: shell-app-manifest.json       
06-30 17:36:28.965 13688 14145 W System.err:    at android.content.res.AssetManager.nativeOpenAsset(Native Method)
06-30 17:36:28.965 13688 14145 W System.err:    at android.content.res.AssetManager.open(AssetManager.java:875)
06-30 17:36:28.965 13688 14145 W System.err:    at android.content.res.AssetManager.open(AssetManager.java:852)
06-30 17:36:28.965 13688 14145 W System.err:    at versioned.host.exp.exponent.modules.universal.ScopedFileSystemModule.getBundledAssets(ScopedFileSystemModule.kt:2)
06-30 17:36:28.965 13688 14145 W System.err:    at versioned.host.exp.exponent.modules.universal.ScopedFileSystemModule.getConstants(ScopedFileSystemModule.kt:2)
06-30 17:36:28.965 13688 14145 W System.err:    at expo.modules.adapters.react.NativeModulesProxy.getConstants(NativeModulesProxy.java:9)
06-30 17:36:28.965 13688 14145 W System.err:    at com.facebook.react.bridge.JavaModuleWrapper.getConstants(JavaModuleWrapper.java:14)
06-30 17:36:28.965 13688 14145 W System.err:    at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
06-30 17:36:28.965 13688 14145 W System.err:    at android.os.Handler.handleCallback(Handler.java:883)    
06-30 17:36:28.965 13688 14145 W System.err:    at android.os.Handler.dispatchMessage(Handler.java:100)   
06-30 17:36:28.965 13688 14145 W System.err:    at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:1)
06-30 17:36:28.965 13688 14145 W System.err:    at android.os.Looper.loop(Looper.java:237)
06-30 17:36:28.965 13688 14145 W System.err:    at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:8)
06-30 17:36:28.965 13688 14145 W System.err:    at java.lang.Thread.run(Thread.java:919)
06-30 17:36:28.982 13688 14145 D i       : WARNING: getPackageName called on ScopedContext
06-30 17:36:29.157 13688 14145 E ReactNativeJS: TypeError: null is not an object (evaluating 't.RATING_HEART')
06-30 17:36:29.166 13688 14145 I ReactNativeJS: Running "main
06-30 17:36:29.169 13688 14145 E ReactNativeJS: Invariant Violation: "main" has not been registered. This can happen if:
06-30 17:36:29.169 13688 14145 E ReactNativeJS: * Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
06-30 17:36:29.169 13688 14145 E ReactNativeJS: * A module failed to load due to an error and `AppRegistry.registerComponent` wasn't called.
06-30 17:36:29.171 13688 14146 W System.err: java.lang.reflect.InvocationTargetException
06-30 17:36:29.171 13688 14146 W System.err:    at java.lang.reflect.Method.invoke(Native Method)
06-30 17:36:29.171 13688 14146 W System.err:    at com.facebook.react.bridge.DefaultNativeModuleCallExceptionHandler.handleException(DefaultNativeModuleCallExceptionHandler.java:4)
06-30 17:36:29.171 13688 14146 W System.err:    at com.facebook.react.devsupport.DisabledDevSupportManager.handleException(DisabledDevSupportManager.java:1)
06-30 17:36:29.171 13688 14146 W System.err:    at com.facebook.react.bridge.CatalystInstanceImpl.onNativeException(CatalystInstanceImpl.java:1)
06-30 17:36:29.171 13688 14146 W System.err:    at com.facebook.react.bridge.CatalystInstanceImpl.access$1100(CatalystInstanceImpl.java:1)
06-30 17:36:29.171 13688 14146 W System.err:    at com.facebook.react.bridge.CatalystInstanceImpl$NativeExceptionHandler.handleException(CatalystInstanceImpl.java:1)
06-30 17:36:29.171 13688 14146 W System.err:    at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:2)
06-30 17:36:29.171 13688 14146 W System.err:    at android.os.Looper.loop(Looper.java:237)
06-30 17:36:29.171 13688 14146 W System.err:    at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:8)
06-30 17:36:29.171 13688 14146 W System.err:    at java.lang.Thread.run(Thread.java:919)
06-30 17:36:29.172 13688 14146 W System.err: Caused by: com.facebook.react.common.JavascriptException: TypeError: null is not an object (evaluating 't.RATING_HEART'), stack:
06-30 17:36:29.172 13688 14146 W System.err: <unknown>@723:1143
06-30 17:36:29.172 13688 14146 W System.err: <unknown>@723:1407
06-30 17:36:29.172 13688 14146 W System.err: h@2:1585
06-30 17:36:29.172 13688 14146 W System.err: <unknown>@722:1821
06-30 17:36:29.172 13688 14146 W System.err: h@2:1585
06-30 17:36:29.172 13688 14146 W System.err: <unknown>@720:415
06-30 17:36:29.172 13688 14146 W System.err: h@2:1585
06-30 17:36:29.172 13688 14146 W System.err: <unknown>@6:69
06-30 17:36:29.172 13688 14146 W System.err: h@2:1585
06-30 17:36:29.172 13688 14146 W System.err: d@2:958
06-30 17:36:29.172 13688 14146 W System.err: global code@1105:3
06-30 17:36:29.172 13688 14146 W System.err:    at host.exp.exponent.ReactNativeStaticHelpers.handleReactNativeError(ReactNativeStaticHelpers.kt:5)
06-30 17:36:29.172 13688 14146 W System.err:    ... 10 more
06-30 17:36:29.176 13688 14146 W System.err: java.lang.reflect.InvocationTargetException
06-30 17:36:29.177 13688 14146 W System.err:    at java.lang.reflect.Method.invoke(Native Method)
06-30 17:36:29.177 13688 14146 W System.err:    at com.facebook.react.bridge.DefaultNativeModuleCallExceptionHandler.handleException(DefaultNativeModuleCallExceptionHandler.java:4)
06-30 17:36:29.177 13688 14146 W System.err:    at com.facebook.react.devsupport.DisabledDevSupportManager.handleException(DisabledDevSupportManager.java:1)
06-30 17:36:29.177 13688 14146 W System.err:    at com.facebook.react.bridge.CatalystInstanceImpl.onNativeException(CatalystInstanceImpl.java:1)
06-30 17:36:29.177 13688 14146 W System.err:    at com.facebook.react.bridge.CatalystInstanceImpl.access$1100(CatalystInstanceImpl.java:1)
06-30 17:36:29.177 13688 14146 W System.err:    at com.facebook.react.bridge.CatalystInstanceImpl$NativeExceptionHandler.handleException(CatalystInstanceImpl.java:1)
06-30 17:36:29.177 13688 14146 W System.err:    at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:2)
06-30 17:36:29.177 13688 14146 W System.err:    at android.os.Looper.loop(Looper.java:237)
06-30 17:36:29.177 13688 14146 W System.err:    at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:8)
06-30 17:36:29.177 13688 14146 W System.err:    at java.lang.Thread.run(Thread.java:919)
06-30 17:36:29.177 13688 14146 W System.err: Caused by: com.facebook.react.common.JavascriptException: Invariant Violation: "main" has not been registered. This can happen if:
06-30 17:36:29.177 13688 14146 W System.err: * Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
06-30 17:36:29.177 13688 14146 W System.err: * A module failed to load due to an error and `AppRegistry.registerComponent` wasn't called., stack:
06-30 17:36:29.177 13688 14146 W System.err: exports@12:289
06-30 17:36:29.177 13688 14146 W System.err: runApplication@337:2081
06-30 17:36:29.177 13688 14146 W System.err: value@58:3579
06-30 17:36:29.177 13688 14146 W System.err: <unknown>@58:758
06-30 17:36:29.177 13688 14146 W System.err: value@58:2582
06-30 17:36:29.177 13688 14146 W System.err: value@58:730
06-30 17:36:29.177 13688 14146 W System.err: value@-1
06-30 17:36:29.177 13688 14146 W System.err:    at host.exp.exponent.ReactNativeStaticHelpers.handleReactNativeError(ReactNativeStaticHelpers.kt:5)
06-30 17:36:29.177 13688 14146 W System.err:    ... 10 more
06-30 17:36:29.195 13688 14146 E unknown:ReactContextBaseJavaModule: Unhandled SoftException
06-30 17:36:29.195 13688 14146 E unknown:ReactContextBaseJavaModule: java.lang.RuntimeException: Catalyst Instance has already disappeared: requested by DeviceInfo
06-30 17:36:29.195 13688 14146 E unknown:ReactContextBaseJavaModule:    at com.facebook.react.bridge.ReactContextBaseJavaModule.getReactApplicationContextIfActiveOrWarn(ReactContextBaseJavaModule.java:4)
06-30 17:36:29.195 13688 14146 E unknown:ReactContextBaseJavaModule:    at com.facebook.react.modules.deviceinfo.DeviceInfoModule.invalidate(DeviceInfoModule.java:2)
06-30 17:36:29.195 13688 14146 E unknown:ReactContextBaseJavaModule:    at com.facebook.react.bridge.ModuleHolder.destroy(ModuleHolder.java:2)
06-30 17:36:29.195 13688 14146 E unknown:ReactContextBaseJavaModule:    at com.facebook.react.bridge.NativeModuleRegistry.notifyJSInstanceDestroy(NativeModuleRegistry.java:4)
06-30 17:36:29.195 13688 14146 E unknown:ReactContextBaseJavaModule:    at com.facebook.react.bridge.CatalystInstanceImpl$1.run(CatalystInstanceImpl.java:1)
06-30 17:36:29.195 13688 14146 E unknown:ReactContextBaseJavaModule:    at android.os.Handler.handleCallback(Handler.java:883)
06-30 17:36:29.195 13688 14146 E unknown:ReactContextBaseJavaModule:    at android.os.Handler.dispatchMessage(Handler.java:100)
06-30 17:36:29.195 13688 14146 E unknown:ReactContextBaseJavaModule:    at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:1)
06-30 17:36:29.195 13688 14146 E unknown:ReactContextBaseJavaModule:    at android.os.Looper.loop(Looper.java:237)
06-30 17:36:29.195 13688 14146 E unknown:ReactContextBaseJavaModule:    at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:8)
06-30 17:36:29.195 13688 14146 E unknown:ReactContextBaseJavaModule:    at java.lang.Thread.run(Thread.java:919)
06-30 17:36:29.197 13688 14146 E unknown:ReactContextBaseJavaModule: Unhandled SoftException
06-30 17:36:29.197 13688 14146 E unknown:ReactContextBaseJavaModule: java.lang.RuntimeException: Catalyst Instance has already disappeared: requested by NativeAnimatedModule
06-30 17:36:29.197 13688 14146 E unknown:ReactContextBaseJavaModule:    at com.facebook.react.bridge.ReactContextBaseJavaModule.getReactApplicationContextIfActiveOrWarn(ReactContextBaseJavaModule.java:4)
06-30 17:36:29.197 13688 14146 E unknown:ReactContextBaseJavaModule:    at com.facebook.react.animated.NativeAnimatedModule.invalidate(NativeAnimatedModule.java:1)
06-30 17:36:29.197 13688 14146 E unknown:ReactContextBaseJavaModule:    at com.facebook.react.bridge.ModuleHolder.destroy(ModuleHolder.java:2)
06-30 17:36:29.197 13688 14146 E unknown:ReactContextBaseJavaModule:    at com.facebook.react.bridge.NativeModuleRegistry.notifyJSInstanceDestroy(NativeModuleRegistry.java:4)
06-30 17:36:29.197 13688 14146 E unknown:ReactContextBaseJavaModule:    at com.facebook.react.bridge.CatalystInstanceImpl$1.run(CatalystInstanceImpl.java:1)
06-30 17:36:29.197 13688 14146 E unknown:ReactContextBaseJavaModule:    at android.os.Handler.handleCallback(Handler.java:883)
06-30 17:36:29.197 13688 14146 E unknown:ReactContextBaseJavaModule:    at android.os.Handler.dispatchMessage(Handler.java:100)
06-30 17:36:29.197 13688 14146 E unknown:ReactContextBaseJavaModule:    at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:1)
06-30 17:36:29.197 13688 14146 E unknown:ReactContextBaseJavaModule:    at android.os.Looper.loop(Looper.java:237)
06-30 17:36:29.197 13688 14146 E unknown:ReactContextBaseJavaModule:    at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:8)
06-30 17:36:29.197 13688 14146 E unknown:ReactContextBaseJavaModule:    at java.lang.Thread.run(Thread.java:919)
06-30 17:36:29.197 13688 14146 E unknown:ReactContextBaseJavaModule: Unhandled SoftException
06-30 17:36:29.197 13688 14146 E unknown:ReactContextBaseJavaModule: java.lang.RuntimeException: Catalyst Instance has already disappeared: requested by FrescoModule
06-30 17:36:29.197 13688 14146 E unknown:ReactContextBaseJavaModule:    at com.facebook.react.bridge.ReactContextBaseJavaModule.getReactApplicationContextIfActiveOrWarn(ReactContextBaseJavaModule.java:4)
06-30 17:36:29.197 13688 14146 E unknown:ReactContextBaseJavaModule:    at com.facebook.react.modules.fresco.FrescoModule.invalidate(FrescoModule.java:2)
06-30 17:36:29.197 13688 14146 E unknown:ReactContextBaseJavaModule:    at com.facebook.react.bridge.ModuleHolder.destroy(ModuleHolder.java:2)
06-30 17:36:29.197 13688 14146 E unknown:ReactContextBaseJavaModule:    at com.facebook.react.bridge.NativeModuleRegistry.notifyJSInstanceDestroy(NativeModuleRegistry.java:4)
06-30 17:36:29.197 13688 14146 E unknown:ReactContextBaseJavaModule:    at com.facebook.react.bridge.CatalystInstanceImpl$1.run(CatalystInstanceImpl.java:1)
06-30 17:36:29.197 13688 14146 E unknown:ReactContextBaseJavaModule:    at android.os.Handler.handleCallback(Handler.java:883)
06-30 17:36:29.197 13688 14146 E unknown:ReactContextBaseJavaModule:    at android.os.Handler.dispatchMessage(Handler.java:100)
06-30 17:36:29.197 13688 14146 E unknown:ReactContextBaseJavaModule:    at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:1)
06-30 17:36:29.197 13688 14146 E unknown:ReactContextBaseJavaModule:    at android.os.Looper.loop(Looper.java:237)
06-30 17:36:29.197 13688 14146 E unknown:ReactContextBaseJavaModule:    at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:8)
06-30 17:36:29.197 13688 14146 E unknown:ReactContextBaseJavaModule:    at java.lang.Thread.run(Thread.java:919)
EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2022-07-04 01:18:01

更新:我使用的特定包(反应-本地-轨道-播放器)有问题,它只适用于在build.gradle中声明的存储库jcenter(),但是他们更新了包,现在它运行良好。

票数 0
EN

Stack Overflow用户

发布于 2022-06-30 20:48:14

似乎在和你交谈之后,index.bundle没有被创建

按照同样的顺序做这件事

代码语言:javascript
复制
cd android
./gradlew clean
cd..

光盘粘贴后代码如下:

代码语言:javascript
复制
react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/build/intermediates/res/merged/release/

在那之后

代码语言:javascript
复制
cd android
./gradlew bundleRelease (not apk if you want to deploy to google play store)
cd ..
react-native run-android --variant=release
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/72821208

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档