使用 image_picker 后出现的情况

来源:6-15 拍照APP开发-拍照配置与AndroidX兼容处理【实战尝鲜】

qq_lws_0

2019-04-21

直接用 Android studio 打开 安卓项目是可以直接部署到模拟器上,但是通过 flutter 项目就无法部署到模拟器上面
Launching lib\main.dart on Android SDK built for x86 in debug mode…
Initializing gradle…
Resolving dependencies…

The Gradle project does not define a task suitable for the requested build.
Review the android/app/build.gradle file and ensure it defines a debug build type.
Gradle task ‘null’…

     *********************************************************

FAILURE: Build failed with an exception.

WARNING: This version of image_picker will break your Android build if it or its dependencies aren’t compatible with AndroidX.

  • What went wrong:
    See https://goo.gl/CP92wY for more information on the problem and how to fix it.
    Task ‘null’ not found in root project ‘android’.

  • Try:
    This warning prints for all Android build failures. The real root cause of the error may be unrelated.
    Run gradlew tasks to get a list of available tasks. 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 2s
Finished with error: Gradle task null failed with exit code 1

写回答

1回答

大王今天不巡山

2019-04-21

compatible with AndroidX没有兼容AndroidX,再仔细看看课程。或者看插件的example!

0
0

Flutter从入门到进阶 实战携程网App 一网打尽核心技术

解锁Flutter开发新姿势,,系统掌握Flutter开发核心技术。

4788 学习 · 3274 问题

查看课程