gpt4 book ai didi

android - 任务 ':sqflite:createFullJarDebug'的执行失败

转载 作者:行者123 更新时间:2023-12-03 03:49:00 24 4
gpt4 key购买 nike

在flutter应用程序上工作时,升级flutter后,我遇到了sqflite的问题。 (path_provider遇到了同样的问题,但用path替换了它。)
我也尝试过flutter clean
错误:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':sqflite:createFullJarDebug'.
> java.nio.file.NoSuchFileException: C:\Users\fayem\AndroidStudioProjects\myapp\build\sqflite\intermediates\library_java_res\debug\res.jar

* 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 10s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)
pubspec.yaml
name: myapp
description: A new Flutter project.

publish_to: 'none' # Remove this line if you wish to publish to pub.dev

version: 1.0.0+1

environment:
sdk: ">=2.7.0 <3.0.0"

dependencies:
flutter:
sdk: flutter
provider: ^4.1.3
adobe_xd: ^1.0.0+1
path: ^1.6.2
sqflite: ^1.3.1+1
flutter_blue: ^0.7.2

cupertino_icons: ^0.1.3

dev_dependencies:
flutter_test:
sdk: flutter

flutter:

uses-material-design: true

assets:
- assets/images/headphones.png
- assets/images/flex-biceps-full.png
- assets/images/flex-biceps.png
- assets/images/exercises/row-1-col-1.jpg
- assets/images/exercises/row-1-col-2.jpg
- assets/images/exercises/row-1-col-3.jpg
- assets/images/exercises/row-2-col-1.jpg
- assets/images/exercises/row-2-col-2.jpg
- assets/images/exercises/row-2-col-3.jpg
- assets/images/exercises/row-3-col-1.jpg
- assets/images/exercises/row-3-col-2.jpg
- assets/images/exercises/row-3-col-3.jpg

fonts:
- family: Segoe UI
fonts:
- asset: assets/fonts/segoeui.ttf
- asset: assets/fonts/segoeuib.ttf
weight: 700
gradle.properties
org.gradle.jvmargs=-Xmx1536M
android.enableR8=true
android.useAndroidX=true
android.enableJetifier=true
build.gradle
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}

def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 29

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}

lintOptions {
disable 'InvalidPackage'
}

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.myapp"
minSdkVersion 19
targetSdkVersion 29
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}

buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
}
}

flutter {
source '../..'
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
flutter 医生-v
[√] Flutter (Channel stable, 1.22.2, on Microsoft Windows [Version 10.0.18363.1139], locale en-US)
• Flutter version 1.22.2 at C:\src\flutter
• Framework revision 84f3d28555 (4 days ago), 2020-10-15 16:26:19 -0700
• Engine revision b8752bbfff
• Dart version 2.10.2


[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at C:\Users\fayem\AppData\Local\Android\Sdk
• Platform android-29, build-tools 29.0.2
• ANDROID_HOME = C:\Users\fayem\AppData\Local\Android\Sdk
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
• All Android licenses accepted.

[√] Android Studio (version 3.6)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 45.1.1
• Dart plugin version 192.8052
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)

[√] VS Code, 64-bit edition (version 1.50.1)
• VS Code at C:\Program Files\Microsoft VS Code
• Flutter extension version 3.15.1

[√] Connected device (1 available)
• SM G920F (mobile) • 041604dc9ba00302 • android-arm64 • Android 7.0 (API 24)

• No issues found!

最佳答案

首先,运行flutter clean,然后,如果不起作用,请删除此缓存目录:

C:\Users\YOURUSERNAME \ .gradle\caches

关于android - 任务 ':sqflite:createFullJarDebug'的执行失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64428271/

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