android - 从 react-native 项目中导出 APK
问题描述
我正在尝试使用此命令从 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 Catalina React Native 版本:~0.61.5 Expo 版本:~37.0.3
我先使用 Expo,然后弹出到一个普通的 react-native 项目
解决方案
您只需要在 '}' 之后删除 ','
推荐阅读
- c# - 如何获取列表元组元素的列表索引
- android - AttributeError:“SConsEnvironment”对象没有属性“android_add_dependency”
- c - 如何在 C 中使用双指针释放树结构
- python - SQLAlchemy 不会使用外部更改更新/过期模型实例
- python - 在 Numpy 多项式中获取值的问题
- javascript - 单击并拖动滚动以获得释放时的动力
- .net - 动态链接如何与 CLR 可执行文件一起工作?
- python - RSA实现解密/加密
- c++ - 使用 Clion 时 GLM 无法构建
- java - 如果一个对象的字段是一个对象……有没有办法获取后一个对象的字段?