gpt4 book ai didi

android - 运行./gradlew assemble时发生Babel错误

转载 作者:行者123 更新时间:2023-12-03 04:20:11 25 4
gpt4 key购买 nike

运行./gradlew assembleRelease后收到此错误:

    Plugin/Preset files are not allowed to export objects, only functions.
In C:\..\node_modules\babel-preset-expo\index.js

:app:bundleReleaseJsAndAssets FAILED

**FAILURE: Build failed with an exception.**

这是 package.json 文件中的内容:
{
"name": "Mascota24",
"version": "0.1.0",
"private": true,
"devDependencies": {
"babel-preset-stage-0": "^6.24.1",
"react-test-renderer": "16.3.1"
},
"scripts": {
"start": "react-native start",
"android": "react-native run-android",
"ios": "react-native run-ios",
"test": "jest"
},
"jest": {
"preset": "react-native"
},
"dependencies": {
"@babel/preset-react": "^7.0.0-beta.53",
"babel-preset-env": "^1.7.0",
"babel-preset-expo": "^4.0.0",
"babel-preset-react": "^6.24.1",
"babel-preset-react-native": "^2.1.0",
"babel-preset-react-native-stage-0": "^1.0.1",
"react": "16.3.1",
"react-native": "^0.56.0",
"react-native-circle-checkbox": "^0.1.6",
"react-native-modal": "^6.4.0",
"react-native-phone-call": "^1.0.7",
"react-navigation": "^2.6.2",
"react-redux": "^5.0.7",
"redux-thunk": "^2.3.0"
}
}

这是 .babelrc 文件:
{
"presets": ["babel-preset-expo"],
"env": {
"development": {
"plugins": ["transform-react-jsx-source"]
}
}
}

我已经关注了几乎所有与此相关的帖子,但没有一个帮助我:(感谢您的帮助

最佳答案

感谢@ashutosh pandey的帮助,我将react-native版本更改为:

"react-native": "^0.55"

然后我安装了 redux并可以生成.apk! :D

关于android - 运行./gradlew assemble时发生Babel错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51312080/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com