我试图用以下命令从一个react-native项目中导出APK。
.gradlew bundleRelease
它引发了这个错误。
Build file '/Users/mohsen/Desktop/fzapp/android/app/build.gradle' line: 154
以下是我终端的完整日志
trooos-MacBook-Pro:android mohsen$ ./gradlew bundleRelease
FAILURE: Build failed with an exception.
* Where:
Build file '/Users/mohsen/Desktop/fzapp/android/app/build.gradle' line: 154
* What went wrong:
Could not compile build file '/Users/mohsen/Desktop/fzapp/android/app/build.gradle'.
> startup failed:
build file '/Users/mohsen/Desktop/fzapp/android/app/build.gradle': 154: expecting '}', found ',' @ line 154, column 10.
},
^
1 error
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 5s
trooos-MacBook-Pro:android mohsen$
出了什么问题?
我的环境信息
MAC OS CatalinaReact Native版本:~0.61.5Expo版本:~37.0.3。
我先用Expo,然后弹射到一个正常的react-native项目上
你只需要把'}'后面的','去掉。