在构建发布包之前,我将按照本机0.67.4 说明来生成密钥和签名配置。该应用程序在安卓仿真器(Android 2120.1.1 Patch2)中运行良好。但是,在构建发布包时,./gradlew assembleRelease和./gradlew bundleRelease都有如下相同的错误:
任务:app:signReleaseBundle失败
w: Detected multiple Kotlin daemon sessions at build/kotlin/sessions
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:signReleaseBundle'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.FinalizeBundleTask$BundleToolRunnable
> java.lang.NullPointerException (no error message)在员额:中尝试了以下内容
yarn run android下面的所有内容安卓工作室2021.1.1 Patch2,Gradle反应本地插件版本7.2.1/(gradle 7.4.1)。
这里是package.json的一部分
"dependencies": {
"@ethersproject/shims": "^5.6.0",
"@react-native-community/toolbar-android": "^0.2.1",
"@react-native-masked-view/masked-view": "^0.2.6",
"@react-native-picker/picker": "^2.4.0",
"@react-navigation/native": "^6.0.8",
"@react-navigation/stack": "^6.1.1",
"crypto-js": "^4.1.1",
"ethers": "^5.6.1",
"react": "17.0.2",
"react-native": "0.67.4",
"react-native-blob-util": "^0.14.1",
"react-native-confirmation-code-field": "^7.3.0",
"react-native-device-info": "^8.5.1",
"react-native-easy-grid": "^0.2.2",
"react-native-elements": "^3.4.2",
"react-native-encrypted-storage": "^4.0.2",
"react-native-flash-message": "^0.2.1",
"react-native-gesture-handler": "^2.3.2",
"react-native-get-random-values": "^1.7.2",
"react-native-gifted-chat": "^0.16.3",
"react-native-image-picker": "^4.7.3",
"react-native-loading-spinner-overlay": "^3.0.0",
"react-native-modal": "^13.0.1",
"react-native-reanimated": "^2.5.0",
"react-native-redash": "^16.2.3",
"react-native-responsive-screen": "^1.4.2",
"react-native-safe-area-context": "^4.2.2",
"react-native-screens": "^3.13.1",
"react-native-vector-icons": "^9.1.0",
"rn-alioss": "^0.2.5",
"socket.io-client": "^4.4.1"
},
"devDependencies": {
"@babel/core": "^7.12.9",
"@babel/runtime": "^7.12.5",
"@react-native-community/eslint-config": "^2.0.0",
"babel-jest": "^26.6.3",
"eslint": "7.14.0",
"jest": "^26.6.3",
"metro-react-native-babel-preset": "^0.66.2",
"react-test-renderer": "17.0.2"
},发布于 2022-05-06 06:59:25
我也在到处寻找解决这个问题的办法。最后,在花了几个小时之后,我终于找到了一个对我有用的解决方案,我认为这也能解决你的问题。
正如错误日志中所示,我们确实有多个kotlin守护进程会话在后台运行。
你可以自己查一下。转到android文件夹并输入
./年级-地位
它将显示所有正在运行的守护进程以及进程id及其状态。现在,我们只能阻止他们。
./gradlew -停止
现在使用终端命令导航到您的home目录
cd ~
之后使用以下方法删除隐藏的.gradle文件夹
sudo rm -rf .gradle
现在您已经删除了所有守护进程缓存,您可以开始新的安装了。
删除node_modules并重新安装块
为安全起见,导航到android文件夹并执行./gradlew clean
现在建立您的反应-本地项目!
https://stackoverflow.com/questions/71801534
复制相似问题