代码之家  ›  专栏  ›  技术社区  ›  K..

React本机应用程序在已签名的APK上显示白色屏幕

  •  0
  • K..  · 技术社区  · 7 年前

    我现在想为Play Store部署构建一个签名的APK,但APK只显示一个白色屏幕。

    render() componentDidMount() 方法,这是有效的。

    看起来我的整个应用程序都在那个白色屏幕后面运行。

    android:debuggable="true" 到我的清单文件和 debuggable true

    我正在使用新安装的

    我的logcat输出(mycompany的灰色)如下所示:

    11-17 13:17:25.614  2859  2859 I Timeline: Timeline: Activity_launch_request time:27233523 intent:Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.mycompany/.MainActivity bnds=[74,600][242,768] (has extras) }
    11-17 13:17:25.737 22995 22995 D SoLoader: adding application source: com.facebook.soloader.DirectorySoSource[root = /data/app/com.mycompany-1/lib/arm flags = 0]
    11-17 13:17:25.738 22995 22995 D SoLoader: adding backup  source: com.facebook.soloader.ApkSoSource[root = /data/data/com.mycompany/lib-main flags = 1]
    11-17 13:17:25.738 22995 22995 D SoLoader: Preparing SO source: com.facebook.soloader.DirectorySoSource[root = /data/app/com.mycompany-1/lib/arm flags = 0]
    11-17 13:17:25.738 22995 22995 D SoLoader: Preparing SO source: com.facebook.soloader.ApkSoSource[root = /data/data/com.mycompany/lib-main flags = 1]
    11-17 13:17:25.739 22995 22995 V fb-UnpackingSoSource: locked dso store /data/user/0/com.mycompany/lib-main
    11-17 13:17:25.741 22995 22995 I fb-UnpackingSoSource: dso store is up-to-date: /data/user/0/com.mycompany/lib-main
    11-17 13:17:25.741 22995 22995 V fb-UnpackingSoSource: releasing dso store lock for /data/user/0/com.mycompany/lib-main
    11-17 13:17:25.872 22995 22995 D AccessibilityManager: current package=com.mycompany, accessibility manager mIsFinalEnabled=false, mOptimizeEnabled=true, mIsUiAutomationEnabled=false, mIsInterestedPackage=false
    11-17 13:17:25.914 22995 23027 W unknown:ReconnectingWebSocket: Couldn't connect to "ws://localhost:8081/message?device=MI%20MAX%202%20-%207.1.1%20-%20API%2025&app=com.mycompany&clientid=DevSupportManagerImpl", will silently retry
    11-17 13:17:25.941 22995 23034 D SoLoader: libreactnativejni.so not found on /data/data/com.mycompany/lib-main
    11-17 13:17:25.941 22995 23034 D SoLoader: libreactnativejni.so found on /data/app/com.mycompany-1/lib/arm
    11-17 13:17:25.962 22995 23034 D SoLoader: libfb.so not found on /data/data/com.mycompany/lib-main
    11-17 13:17:25.962 22995 23034 D SoLoader: libfb.so found on /data/app/com.mycompany-1/lib/arm
    11-17 13:17:25.963 22995 23034 D SoLoader: libfb.so not found on /data/data/com.mycompany/lib-main
    11-17 13:17:25.963 22995 23034 D SoLoader: libfb.so found on /data/app/com.mycompany-1/lib/arm
    11-17 13:17:25.963 22995 23034 I art     : Thread[26,tid=23034,Native,Thread*=0xd6945100,peer=0x130119d0,"Thread-3"] recursive attempt to load library "/data/app/com.mycompany-1/lib/arm/libfb.so"
    11-17 13:17:25.990  1549  1571 I ActivityManager: Displayed com.mycompany/.MainActivity: +353ms
    11-17 13:17:25.999  1549  1571 I Timeline: Timeline: Activity_windows_visible id: ActivityRecord{f1eb1f9 u0 com.mycompany/.MainActivity t21113} time:27233909
    11-17 13:17:26.169   464   469 E Vold    : Failed to find mounted volume for /dev/null/Android/data/com.mycompany/cache/
    11-17 13:17:26.170 22995 23018 W ContextImpl: Failed to ensure /dev/null/Android/data/com.mycompany/cache: 400
    11-17 13:17:26.203 22995 23042 D SoLoader: libyoga.so not found on /data/data/com.mycompany/lib-main
    11-17 13:17:26.203 22995 23042 D SoLoader: libyoga.so found on /data/app/com.mycompany-1/lib/arm
    11-17 13:17:27.342   464   469 E Vold    : Failed to find mounted volume for /dev/null/Android/data/com.mycompany/files/
    11-17 13:17:27.344 22995 23041 W ContextImpl: Failed to ensure /dev/null/Android/data/com.mycompany/files: 400
    11-17 13:17:27.389 22995 23041 I ReactNativeJS: Running application "mycompany" with appParams: {"rootTag":1}. __DEV__ === false, development-level warningare OFF, performance optimizations are ON
    

    我的部门是这样的:

      "dependencies": {
        "base-64": "^0.1.0",
        "buffer": "5.0.7",
        "glamorous-native": "1.1.2",
        "md5": "2.2.1",
        "moment": "2.18.1",
        "password-validator": "4.0.0",
        "prop-types": "15.6.2",
        "react": "16.6.0-alpha.8af6728",
        "react-native": "0.57.4",
        "react-native-audio": "4.1.3",
        "react-native-datepicker": "1.6.0",
        "react-native-fbsdk": "^0.8.0",
        "react-native-fetch-blob": "0.10.8",
        "react-native-image-picker": "0.26.4",
        "react-native-keep-awake": "2.0.5",
        "react-native-keyboard-aware-scroll-view": "0.3.0",
        "react-native-keyboard-aware-view": "0.0.14",
        "react-native-linear-gradient": "2.4.2",
        "react-native-orientation": "3.0.0",
        "react-native-sentry": "^0.39.1",
        "react-native-sha256": "1.1.1",
        "react-native-sound": "0.10.4",
        "react-native-store-review": "0.1.5",
        "react-native-svg": "6.5.2",
        "react-native-swipe-a-lot": "kay-is/react-native-swipe-a-lot",
        "react-native-video": "3.2.1",
        "redux": "3.7.2",
        "validator": "8.1.0"
      },
      "devDependencies": {
        "babel-jest": "23.6.0",
        "jest": "23.6.0",
        "metro-react-native-babel-preset": "0.49.0",
        "react-test-renderer": "16.6.0-alpha.8af6728",
        "ws": "^6.1.0"
      },
    

    我还尝试了不同的FB-SDK版本,它没有改变任何东西。

    1 回复  |  直到 7 年前
        1
  •  0
  •   K..    7 年前

    我今天完成了所有的DEP。将glamorous native更新到1.4.0版修复了该问题。

    推荐文章