gpt4 book ai didi

android - 编译APK时 react native 不推荐使用的Gradle功能

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

我正在尝试使用./gradlew bundleRelease构建我的apk,但我总是遇到此错误:

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

关于android - 编译APK时 react native 不推荐使用的Gradle功能,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62115691/

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