重命名项目后,我的反应本机项目无法构建



我试图重命名我的应用程序,因为我需要它,但在重命名它后遇到了问题(在我重命名它之前它工作正常(。我遵循了以下说明:https://dev.to/abdulbasit313/proper-way-to-rename-a-react-native-project-in-2019-3b98 但是当我运行时,构建失败

我正在使用反应本机 0.59.9

这是错误:

info Starting JS server...
info Building and installing the app on the device (cd android && gradlew.bat app:installDebug)...
> Task :app:preDebugBuild FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:preDebugBuild'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not find com.github.yalantis:ucrop:2.2.2-native.
Searched in the following locations:
- file:/C:/Users/ASUS/.m2/repository/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.pom
- file:/C:/Users/ASUS/.m2/repository/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.jar
- https://dl.google.com/dl/android/maven2/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.pom
- https://dl.google.com/dl/android/maven2/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.jar
- https://jcenter.bintray.com/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.pom
- https://jcenter.bintray.com/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.jar
- file:/D:/3-SIMASA/simasamobile/node_modules/react-native/android/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.pom
- file:/D:/3-SIMASA/simasamobile/node_modules/react-native/android/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.jar
Required by:
project :app > project :react-native-image-crop-picker
* 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 7s
21 actionable tasks: 20 executed, 1 up-to-date
error Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html
error Command failed: gradlew.bat app:installDebug. Run CLI with --verbose flag for more details.

提到的解决方案不正确,因为它会清除您的链接库......您可以通过更改android/src/main/res/values/strings.xml中的name来轻松重命名 android 项目。同样在 iOS 上,您可以通过在 Xcode 中打开ios/your_project.xcodeproj来更改名称,并在项目设置的"General"选项卡中修改Display Name

请重新安装并重新链接库。这将解决问题。

反应原生图像裁剪拾取器

另请参阅此处,了解如何以更简单的方式重命名项目。

相关内容

  • 没有找到相关文章

最新更新