配置项目 ':flutter_launch' 时出现问题

时间:2021-03-23 05:25:39

标签: flutter kotlin gradle flutter-dependencies

运行应用程序时出错,下面给出的详细信息请检查并为此提供解决方案。

控制台显示错误 -

[+152697 ms] FAILURE: Build failed with an exception.
[   +2 ms] * What went wrong:
[        ] A problem occurred configuring project ':flutter_launch'.
[        ] > The Android Gradle plugin supports only Kotlin Gradle plugin version 1.3.10 and higher.
[        ]   The following dependencies do not satisfy the required version:
[        ]   project ':flutter_launch' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.71
[        ] * 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 3m 53s

project build.gradle -

buildscript {
    ext.kotlin_version = '1.3.72'
    repositories {
        google()
        jcenter()
    }

    dependencies {
        //classpath 'com.android.tools.build:gradle:3.5.0'
        classpath 'com.android.tools.build:gradle:4.1.3'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath 'com.google.gms:google-services:4.3.5'
    }
}

allprojects {
    repositories {
        google()
        jcenter()
    }
}

rootProject.buildDir = '../build'
subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
    project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

pubspec.yaml

name: 
description: A new Flutter project.

# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.0.0+1

environment:
  sdk: ">=2.2.2 <3.0.0"

dependency_overrides:
  intl: 0.17.0-nullsafety.2

dependencies:
  flutter:
    sdk: flutter

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

  package_info: ^0.4.0+13       # => Package information (App name..)
  flutter_bloc: ^0.21.0         # used in app theme change flutter_bloc: ^0.21.0
  equatable: ^0.5.1             # used in app theme change
  hydrated_bloc: ^0.4.0         # used in app theme change
  enum_to_string: ^1.0.7        # used in app theme change
  # firebase_messaging: ^6.0.9    # firebase messaging
  fluttertoast: ^3.1.3          # => Toast messages

  shared_preferences: ^0.5.1+2    # => Local storage (small files)
  unique_identifier: ^0.0.3       # => For get unique-ID
  image_picker: ^0.6.3+1         # => for gallery and camera access
  image_cropper: ^1.2.1           # => for crop the image

  http: ^0.12.0+2               # => for http calls
  # syncfusion_flutter_charts: ^18.1.59
  # syncfusion_flutter_charts: ^1.0.0-beta.3   # => for dashboard chart
  bubble_tab_indicator: ^0.1.4  # => EMR report tab selection
  sticky_headers: "^0.1.8"      # => EMR report headers
  flutter_speed_dial: ^1.2.5    # => EMR report floating button
  recase: ^2.0.1                # convert string case
  bezier_chart: ^1.0.17+1       # vital charts
  charts_flutter: ^0.9.0
  font_awesome_flutter: ^8.8.1  # more icons
  speech_to_text: ^0.7.2        # used in clinical notes entry
  autocomplete_textfield: ^1.6.4 # used in diagnosis addition  
  flutter_slidable: ^0.5.4       # list slide actions
  

  signature: ^3.0.0              #treatment image
  screenshot: ^0.1.1
  zoom_widget: ^0.1.3
  image_gallery_saver: ^1.2.2
  flutter_colorpicker: ^0.3.2
  
  flutter_launch: ^0.2.0
  flutter_phone_state: ^0.5.8

  photo_view: ^0.9.2

  intl: ^0.16.0                 # for locale, datetime format
  # settings_ui: ^0.3.0
  dio: ^3.0.9
  sqflite: ^1.3.1

  flutter_html: ^0.11.1         # To display html text as page
  # syncfusion_flutter_charts: ^18.1.59
  syncfusion_flutter_charts: ^18.4.30
  scoped_model: 1.0.1
  flutter_rounded_date_picker: ^1.0.4
  # screen_loader: ^2.0.0
  bordered_text: ^1.0.0
  progress_dialog: ^1.2.0       # => progress Dialogs
  flutter_full_pdf_viewer: ^1.0.6

  url_launcher: ^5.5.0
  open_file: ^3.0.1
  html2md: ^0.5.1
  flutter_markdown: ^0.4.2
  flushbar: ^1.10.4

  image_whisperer: ^0.11.0

  app_settings: ^4.0.2
  location: ^3.0.2

  firebase_messaging: ^6.0.16

  wakelock: ^0.1.4+2
  # flutter_share: ^1.0.2+1
  share: ^0.6.4+3
  share_extend: "^1.1.9"
  version_banner: ^0.2.1
  connectivity: ^0.4.9
  flutter_local_notifications: ^1.4.4+4
  firebase_database: ^4.0.0
  device_info: ^0.4.2+7
  # google_fonts: ^0.3.8
  app_review: ^2.0.1

  # chat
  path_provider: ^1.1.1
  
  
  
  
  
  
  file_picker: ^1.5.1
  
  date_format: ^1.0.8
  
  mime_type: ^0.3.1   #UPLOAD FILE
  
  simple_permissions: ^0.1.9
  overlay_support: ^1.0.4   # for notification over screen
  audioplayers: ^0.15.1
  signalr_client: ^0.1.6        # signalr support
  # logging: ^0.11.3+2
  w3c_event_source: ^1.0.0
  # rxdart : ^0.24.1
  audio_recorder: ^1.0.2
  proximity_plugin: ^1.0.2
  # app_settings: 4.0.2
  
  camera: ^0.5.8+11
  video_player: ^1.0.1

  google_maps_flutter: ^1.0.6
  launch_review: ^2.0.0
  

dev_dependencies:
  flutter_test:
    sdk: flutter
  flutter_localizations:
    sdk: flutter
  flutter_cupertino_localizations: ^1.0.1  

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec

我提供了错误日志、gradle 和 pubspec 文件以供参考,请检查并告诉我如何清除它并运行应用程序。

提前致谢

0 个答案:

没有答案