2

Is there anyone who gets an error with first-party plugin image_picker? After I add it to pubspec.yaml, my app was crashed.

My problem is exactly the same with this issue flutter/flutter#24463.

What I can do to solve this problem without waiting?

My pubspec.yaml dependencies

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 doctor

[✓] 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)
Jrog
  • 1,469
  • 10
  • 29

1 Answers1

1

Finally, I solved this problem. Gradle version caused the problem.

Change version in android/build.gradle to the latest version.

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

Now, my app was not crashed.

Jrog
  • 1,469
  • 10
  • 29