正在安装react-native-sqlite-storage

问题描述 投票:1回答:1

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

我尝试使用命令:react-native run-android来运行它,一直在我得到错误的时候:

FAILURE:构建失败,出现异常。出了什么问题:无法确定任务':app:mergeDebugAssets'的依赖关系。不能解决所有任务依赖关系以进行配置':app:debugRuntimeClasspath'。无法解析项目:react-native-sqlite-storage。要求:项目:app找不到项目的匹配配置:react-native-sqlite-storage:无消耗性配置有属性。尝试:使用--stacktrace选项运行以获取堆栈跟踪。使用--info或--debug选项运行以获取更多日志输出。跑使用--scan获得完整的见解。*在1秒内获得https://help.gradle.org失败的更多帮助。无法在设备上安装该应用程序,有关详细信息,请阅读上述错误。确保您正在运行Android模拟器或已连接设备并设置了您的Android开发环境:https://facebook.github.io/react-native/docs/getting-started.html命令失败:gradlew.bat installDebug错误:命令失败:gradlew.bat installDebug在checkExecSyncError(child_process.js:616:11)在Object.execFileSync(child_process.js:634:13)在runOnAllDevices(D:\ RN \ SqlApp1 \ node_modules \ react-native \ local-cli \ runAndroid \ runAndroid.js:299:19)在buildAndRun(D:\ RN \ SqlApp1 \ node_modules \ react-native \ local-cli \ runAndroid \ runAndroid.js:135:12)在isPackagerRunning.then.result(D:\ RN \ SqlApp1 \ node_modules \ react-native \ local-cli \ runAndroid \ runAndroid.js:65:12)在process._tickCallback(内部/进程/next_tick.js:68:7)

您能否建议如何解决?谢谢

android sqlite react-native
1个回答
0
投票

尝试一下

转到您的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

© www.soinside.com 2019 - 2024. All rights reserved.