gpt4 book ai didi

javascript - 我正在使用 react-native-photo-upload 库上传个人资料图片,但它抛出构建失败错误

转载 作者:行者123 更新时间:2023-11-30 05:07:44 25 4
gpt4 key购买 nike

我使用的库是 yarn add react-native-photo-upload 来自 https://www.npmjs.com/package/react-native-photo-upload并抛出以下错误:

**/home/haseeb/Desktop/RN/myProject/node_modules/react-native-image-picker/android/build/intermediates/res/merged/release/values-v26/values-v26.xml:15:21-54: AAPT: No resource found that matches the given name: attr 'android:keyboardNavigationCluster'.

/home/haseeb/Desktop/RN/myProject/node_modules/react-native-image-picker/android/build/intermediates/res/merged/release/values-v26/values-v26.xml:15: error: Error: No resource found that matches the given name: attr 'android:keyboardNavigationCluster'.
:react-native-image-picker:processReleaseResources FAILED

**FAILURE**: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-image-picker:processReleaseResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 5.653 secs
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**

我在 react-native-image-picker 的 gradle.properties 中尝试了 android.enableAapt2=false 但没有获得...同样的错误

请帮忙解决!

最佳答案

一定要按照库的说明,运行yarn add react-native-photo-upload后
,您需要确保链接包并再次构建项目:

react-native link react-native-image-picker
react-native link react-native-image-resizer
react-native link react-native-fs

之后,您可以转到 yourProject/android/settings.gradle 并验证是否已添加所有模块。它可能看起来像:

include ':module-name'
project(':module-name').projectDir = new File(rootProject.projectDir,
'../node_modules/module-name/android')

你也可以去 yourProject/android/app/build.gradle 检查依赖项中是否存在模块:

dependencies {
compile project(':module-name')
}

关于javascript - 我正在使用 react-native-photo-upload 库上传个人资料图片,但它抛出构建失败错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54258327/

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