gpt4 book ai didi

plugins - Flutter image_picker 插件导致应用崩溃

转载 作者:IT王子 更新时间:2023-10-29 06:43:30 26 4
gpt4 key购买 nike

是否有人在使用第一方插件 image_picker 时遇到错误?将它添加到 pubspec.yaml 后,我的应用程序崩溃了。

我的问题和这个问题一模一样flutter/flutter#24463 .

我可以做些什么来解决这个问题而无需等待?

我的 pubspec.yaml 依赖项

version: 1.0.0+2

environment:
sdk: ">=2.0.0 <3.0.0"

dependencies:
flutter:
sdk: flutter

cupertino_icons: ^0.1.2
# image_picker: ^0.4.10

sqflite: ^0.12.2+1
path_provider: ^0.4.1
pigment: ^1.0.3

dev_dependencies:
flutter_test:
sdk: flutter
test: ^1.5.1
mockito: ^4.0.0

flutter 医生

[✓] Flutter (Channel beta, v0.11.10, on Linux, locale ko_KR.UTF-8)
• Flutter version 0.11.10 at /home/jyj/InstalledApp/flutter
• Framework revision c27c4a265e (3일 전), 2018-11-26 17:07:24 -0500
• Engine revision eebc6a5895
• Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)

[✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)
• Android SDK at /home/jyj/Android/Sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• ANDROID_HOME = /home/jyj/Android/Sdk
• Java binary at: /home/jyj/InstalledApp/android-studio/jre/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
• All Android licenses accepted.

[✓] Android Studio (version 3.2)
• Android Studio at /home/jyj/InstalledApp/android-studio
• Flutter plugin version 29.1.1
• Dart plugin version 181.5656
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)

[✓] Connected device (1 available)
• LG F800S • LGF800S959e3040 • android-arm64 • Android 8.0.0 (API 26)

最佳答案

最后,我解决了这个问题。 Gradle 版本导致了问题。

android/build.gradle 中的版本更改为最新版本。

...
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
....
}

现在,我的应用程序没有崩溃。

关于plugins - Flutter image_picker 插件导致应用崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53551150/

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