React-Native Android Studio项目构建失败,显示“此构建中使用了过时的Gradle功能,使其与Gradle 6.0不兼容”。

时间:2019-07-18 08:19:36

标签: android react-native gradle

我正在开发一个“ React-Native”项目,并且没有显示错误消息“此构建中使用了不推荐使用的Gradle功能,从而使其与Gradle 6.0不兼容”。

>

问题是正在访问文件,因为它显示“该进程无法访问文件,因为它正在被另一个进程使用。”

构建项目时,它显示如下异常:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> java.nio.file.FileSystemException: E:\TrackFriends\android\app\build\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_: The process cannot access the file because it is being used by another process.


* 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 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.4.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 2s
43 actionable tasks: 2 executed, 41 up-to-date

任何解决方案如何解决?我的项目包如下:

"react": "16.8.3",
"react-native": "^0.59.9",
"react-native-elements": "^1.1.0",
"react-native-firebase": "^5.3.1",
"react-native-gesture-handler": "^1.1.0",
"react-native-maps": "^0.24.2",
"react-native-vector-icons": "^6.6.0",
"react-navigation": "^3.6.1"

1 个答案:

答案 0 :(得分:0)

找到的解决方案: 在我的年长者的帮助下找到了解决方案,当他试图删除此文件E:\TrackFriends\android\app\build\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_:时,该文件无法删除,并显示了在Java(TM) Platform SE Binary中打开文件的消息。因此,只需打开任务管理器并结束任务即可。现在,应用程序正在成功构建。