扑SQLlite不担心

时间:2019-05-23 19:03:55

标签: sqlite flutter

我正在编写一个颤动的应用程序,并且尝试使用SQLite进行学习,根据文档,我在依赖项中添加了程序包,并运行命令来获取它。

编译时会出错

  dependencies:
   flutter:
    sdk: flutter
   sqflite: ^1.1.5
  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^0.1.2

我希望应用程序运行,但会给出错误

PS D:\my\flutter\snapexpense_new> flutter run
Using hardware rendering with device Android SDK built for x86. If you get graphics artifacts, consider enabling software rendering with "--enable-software-rendering".
Launching lib/main.dart on Android SDK built for x86 in debug mode...
Initializing gradle...                                              1.2s
Resolving dependencies...                                           3.8s

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all files for configuration ':sqflite:lintClassPath'.
> Could not download kotlin-compiler.jar (com.android.tools.external.com-intellij:kotlin-compiler:26.2.1)
   > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/external/com-intellij/kotlin-compiler/26.2.1/kotlin-compiler-26.2.1.jar'.
      > Connection reset

* 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

Running Gradle task 'assembleDebug'... Done                       120.2s (!)
Gradle task assembleDebug failed with exit code 1

1 个答案:

答案 0 :(得分:0)

那天我也遇到这个问题,但是幸运的是,经过大量的研究时间,我才安定下来。

第一步 您必须下载kotlin-compiler.jar

第二步 enter image description here

打开项目列表,转到上图中的文件夹,然后粘贴 kotlin-compiler.jar

完成所有这些操作后,打开您的flutter项目并更新您的依赖项,并在完成后重新运行应用程序。

对我来说,它希望对您也有用。