gpt4 book ai didi

android - 安装 react-native-sqlite-storage

转载 作者:行者123 更新时间:2023-12-03 17:46:40 25 4
gpt4 key购买 nike

你好,我是 React Native 的新手,我尝试安装 react-native-sqlite-storage改变安装,我按照 android 设置的所有说明进行操作:[ https://www.npmjs.com/package/react-native-sqlite-storage][1]

我尝试使用命令 :react-native run-android 运行它,但我一直收到错误消息:

FAILURE: Build failed with an exception. What went wrong: Could not determine the dependencies of task ':app:mergeDebugAssets'. Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'. Could not resolve project :react-native-sqlite-storage. Required by: project :app Unable to find a matching configuration of project :react-native-sqlite-storage: None of the consumable configurations have attributes. 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 BUILD FAILED in 1s 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 Command failed: gradlew.bat installDebug Error: Command failed: gradlew.bat installDebug at checkExecSyncError (child_process.js:616:11) at Object.execFileSync (child_process.js:634:13) at runOnAllDevices (D:\RN\SqlApp1\node_modules\react-native\local-cli\runAndroid\runAndroid.js:299:19) at buildAndRun (D:\RN\SqlApp1\node_modules\react-native\local-cli\runAndroid\runAndroid.js:135:12) at isPackagerRunning.then.result (D:\RN\SqlApp1\node_modules\react-native\local-cli\runAndroid\runAndroid.js:65:12) at process._tickCallback (internal/process/next_tick.js:68:7)

你能建议如何解决这个问题吗?谢谢

最佳答案

试试这个

转到您的 settings.gradle 文件并更改此行

project(':react-native-sqlite-storage').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-sqlite-storage/src/android')

project(':react-native-sqlite-storage').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-sqlite-storage/platforms/android')

refer this

关于android - 安装 react-native-sqlite-storage,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54806648/

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