android - 构建 apk 时反应原生已弃用的 Gradle 功能
问题描述
我正在尝试使用构建我的 apk,./gradlew bundleRelease
但我总是收到此错误:
error EISDIR: illegal operation on a directory, open 'P:\React'. Run CLI with --verbose flag for more details.
Error: EISDIR: illegal operation on a directory, open 'P:\React'
> Task :app:bundleReleaseJsAndAssets FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:bundleReleaseJsAndAssets'.
> Process 'command 'npx.cmd'' finished with non-zero exit value 1
* 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
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.0.1/userguide/command_line_interface.html#sec:command_line_warnings
我也尝试过./gradlew app:assembleRelease
,但我得到了同样的错误。我还使用 npx 创建了我的项目。
解决方案
我尝试了一切,我什至更新了项目 gradle 版本,但我仍然会得到同样的错误。但解决方案就是这样:
cd android
清理你的gradle:
./gradlew clean
然后:
./gradlew assembleRelease -x bundleReleaseJsAndAssets
推荐阅读
- python - 再次执行程序时更新的字典无法识别新添加的键
- javascript - 如何使用 Jest 模拟用户模块内的非导出(私有)函数
- javascript - D3JS 图表:悬停在某些过渡元素上,而其他元素仍在过渡,则会停止执行图表动画
- android - 使用 Facebook 身份验证登录问题
- php - Woocommerce 中的产品附加按钮
- python - 单击鼠标并在视频中的鼠标位置绘制固定矩形(python_opencv)
- javascript - jQuery addClass 在 for 循环中不起作用
- python - python中opencv拼接器类的高级实现
- node.js - AWS弹性Beanstalk / nginx:connect()失败(111:连接被拒绝
- angular - 使用 httpclient 和 formdata 请求的资源上不存在“Access-Control-Allow-Origin”标头