我有一个expokit弹出项目,我正在尝试生成一个签名的apk。让我自己解释一下:
当我使用expo start && cd android && ./gradlew clean && ./gradlew installDebug
运行项目时,项目将正确编译并执行。
但是,当我尝试通过执行./gradlew clean && ./gradlew installRelease
安装签名版本时,尝试打开它时我的应用程序崩溃了。我有两个同事以相同的过程成功安装和运行签名的apk,因此显然与我的环境有关。
这是我的本机环境:
React Native Environment Info:
System:
OS: macOS 10.14.6
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 161.89 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 12.12.0 - ~/.nvm/versions/node/v12.12.0/bin/node
Yarn: 1.9.2 - ~/.yvm/versions/v1.9.2/bin/yarn
npm: 6.11.3 - ~/.nvm/versions/node/v12.12.0/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 13.1, DriverKit 19.0, macOS 10.15, tvOS 13.0, watchOS 6.0
Android SDK:
API Levels: 23, 25, 26, 27, 28, 29
Build Tools: 27.0.3, 28.0.2, 28.0.3, 29.0.2
System Images: android-29 | Google Play Intel x86 Atom
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.5791312
Xcode: 11.1/11A1027 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.3 => 16.8.3
react-native: https://github.com/expo/react-native/archive/sdk-35.0.0.tar.gz => 0.59.8
npmGlobalPackages:
react-native-cli: 2.0.1
这是我两个同事的环境:
React Native Environment Info:
System:
OS: macOS 10.15
CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
Memory: 853.90 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 12.9.1 - ~/.nvm/versions/node/v12.9.1/bin/node
Yarn: 1.16.0 - /usr/local/bin/yarn
npm: 6.10.2 - ~/.nvm/versions/node/v12.9.1/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
Android SDK:
API Levels: 23, 24, 25, 26, 27, 28
Build Tools: 27.0.3, 28.0.2, 28.0.3
System Images: android-26 | Google Play Intel x86 Atom, android-27 | Google Play Intel x86 Atom, android-28 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.5977832
Xcode: 11.2.1/11B500 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.3 => 16.8.3
react-native: https://github.com/expo/react-native/archive/sdk-35.0.0.tar.gz => 0.59.8
npmGlobalPackages:
react-native-cli: 2.0.1
和
React Native Environment Info:
System:
OS: macOS 10.15
CPU: (4) x64 Intel(R) Core(TM) i5-7400 CPU @ 3.00GHz
Memory: 94.84 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 12.12.0 - /usr/local/bin/node
Yarn: 1.9.2 - /usr/local/bin/yarn
npm: 6.11.3 - /usr/local/bin/npm
SDKs:
iOS SDK:
Platforms: iOS 13.0, DriverKit 19.0, macOS 10.15, tvOS 13.0, watchOS 6.0
Android SDK:
API Levels: 21, 23, 24, 25, 26, 27, 28
Build Tools: 26.0.2, 27.0.0, 27.0.3, 28.0.1, 28.0.2, 28.0.3, 29.0.0
System Images: android-26 | Google Play Intel x86 Atom, android-27 | Google Play Intel x86 Atom, android-29 | Google Play Intel x86 Atom
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.5977832
Xcode: 11.0/11A420a - /usr/bin/xcodebuild
npmPackages:
react: 16.8.3 => 16.8.3
react-native: https://github.com/expo/react-native/archive/sdk-35.0.0.tar.gz => 0.59.8
npmGlobalPackages:
react-native-cli: 2.0.1