插件cordova-sqlite-storage的问题
Posted
技术标签:
【中文标题】插件cordova-sqlite-storage的问题【英文标题】:Problem with plugin cordova-sqlite-storage 【发布时间】:2021-03-15 12:06:06 【问题描述】:我有一个科尔多瓦(离子)项目的问题,应用程序编译成功。但是当我添加 cordova-sqlite-storage 插件时。
cordova plugin add cordova-sqlite-storage --save
编译中断。
└────╼ ionic cordova build android
> ionic-app-scripts build --target cordova --platform android
> cordova build android
9.0.0
cordova-android-support-gradle-release: Android platform: V7+
cordova-android-support-gradle-release: Wrote custom version '27.+' to /home/dylan-roman/Documentos/projects/adnmovil/platforms/android/app/build.gradle
cordova-android-support-gradle-release: Wrote custom version '27.+' to /home/dylan-roman/Documentos/projects/adnmovil/platforms/android/cordova-android-support-gradle-release/movil-cordova-android-support-gradle-release.gradle
cordova-android-support-gradle-release: Android platform: V7+
cordova-android-support-gradle-release: Wrote custom version '27.+' to /home/dylan-roman/Documentos/projects/adnmovil/platforms/android/app/build.gradle
cordova-android-support-gradle-release: Wrote custom version '27.+' to /home/dylan-roman/Documentos/projects/adnmovil/platforms/android/cordova-android-support-gradle-release/movil-cordova-android-support-gradle-release.gradle
Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=/home/dylan-roman/Android/Sdk (recommended setting)
ANDROID_HOME=/home/dylan-roman/Android/Sdk (DEPRECATED)
Using Android SDK: /home/dylan-roman/Android/Sdk
Subproject Path: CordovaLib
Subproject Path: app
> Configure project :app
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed in version 5.0 of the Android Gradle plugin.
For more information, see http://d.android.com/r/tools/update-dependency-configurations.html.
+-----------------------------------------------------------------
| cordova-android-support-gradle-release: 27.+
+-----------------------------------------------------------------
> Task :app:stripDebugDebugSymbols FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:stripDebugDebugSymbols'.
> No version of NDK matched the requested version 21.0.6113669. Versions available locally: 22.0.6917172
* 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 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.5/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 2s
40 actionable tasks: 11 executed, 29 up-to-date
Command failed with exit code 1: /home/dylan-roman/Documentos/projects/adnmovil/platforms/android/gradlew cdvBuildDebug -b /home/dylan-roman/Documentos/projects/adnmovil/platforms/android/build.gradle
[ERROR] An error occurred while running subprocess cordova.
cordova build android exited with exit code 1.
Re-running this command with the --verbose flag may provide more information
如果我删除插件编译成功 我已经尝试删除平台,然后添加 android 和 cordova prepare
请帮帮我
【问题讨论】:
我用的是arch linux :) 【参考方案1】:在为 ios 编译时,我在 Mac OS 上遇到了一些与 cordova 类似的问题。我切换到cordova-plugin-sqlite-2,它为我解决了这个问题。你不需要做任何代码更改,只需安装这个插件而不是其他 sql 插件。
【讨论】:
以上是关于插件cordova-sqlite-storage的问题的主要内容,如果未能解决你的问题,请参考以下文章
Ionic + cordova-sqlite-storage + deviceready = 过渡时没有渲染?
我无法在 cordova-sqlite-storage 中为 ionic 1 打开数据库
在 Windows 10 中使用 cordova-plugin-file 复制 SQLite 数据库 cordova-sqlite-storage