颤振| Android Gradle插件仅支持Kotlin Gradle插件版本1.3.0及更高版本

颤振| Android Gradle插件仅支持Kotlin Gradle插件版本1.3.0及更高版本,第1张

概述我正在尝试添加firebase依赖项.当我跑到跑步时,我得到了 The Android Gradle plugin supports only Kotlin Gradle plugin version 1.3.0 and higher.The following dependencies do not satisfy the required version:project ':google_ 我正在尝试添加firebase依赖项.当我跑到跑步时,我得到了

The AndroID Gradle plugin supports only Kotlin Gradle plugin version 1.3.0 and higher.The following dependencIEs do not satisfy the required version:project ':Google_API_availability' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.71

Pubscec.yaml

dependencIEs:  Flutter:    sdk: Flutter  firebase_auth: ^0.8.1  Google_sign_in: ^4.0.1  cloud_firestore: ^0.9.0+1  firebase_core: ^0.3.0+1  firebase_storage: ^2.0.1  cupertino_icons: ^0.1.2  Font_awesome_Flutter: ^8.0.1  country_code_picker: ^1.1.0  Fluttertoast: ^2.0.7  image_picker: ^0.4.6  shared_preferences: ^0.4.2  cached_network_image: ^0.4.1  intl: ^0.15.7  geolocator: ^2.1.1  http: ^0.11.3+14  Flutter_Google_places: ^0.1.4+1  location: ^1.1.6  uuID: ^1.0.3  auto_size_text: 0.3.0

的build.gradle

buildscript {    repositorIEs {        Google()        jcenter()    }    dependencIEs {        classpath 'com.androID.tools.build:gradle:3.3.1'        classpath 'com.Google.gms:Google-services:4.2.0'    }}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}

应用程序/的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.")}apply plugin: 'com.androID.application'apply from: "$FlutterRoot/packages/Flutter_tools/gradle/Flutter.gradle"androID {    compileSdkVersion 28    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 16        targetSdkVersion 28        versionCode 1        versionname "1.0"        testInstrumentationRunner "androID.support.test.runner.AndroIDJUnitRunner"    }    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 {    testImplementation 'junit:junit:4.12'    androIDTestImplementation 'com.androID.support.test:runner:1.0.2'    androIDTestImplementation 'com.androID.support.test.espresso:espresso-core:3.0.2'}apply plugin: 'com.Google.gms.Google-services'  // Gradle plugin
解决方法 您可以通过在项目的根目录上运行Flutter packages pub deps来查找依赖于Google_API_availability的程序包 – 这将在树视图中列出项目的所有直接和传递依赖项.

我找不到显示包的插件依赖关系的方法 – 我想你只会在尝试构建它时找到它.

问题是您使用的是AndroID Gradle插件的3.3.1版本,该插件强制执行Kotlin 1.3.0或更高版本.与此同时,geolocator包依赖于Google_API_availability,这似乎是使用Kotlin 1.2.71.目前没有使用Kotlin 1.3.0或更高版本的Google_API_availability版本,因此您只有1个解决方案 – 将AndroID Gradle插件降级到版本3.2.1.

总结

以上是内存溢出为你收集整理的颤振| Android Gradle插件仅支持Kotlin Gradle插件版本1.3.0及更高版本全部内容,希望文章能够帮你解决颤振| Android Gradle插件仅支持Kotlin Gradle插件版本1.3.0及更高版本所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://www.outofmemory.cn/web/1000593.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-21
下一篇 2022-05-21

发表评论

登录后才能评论

评论列表(0条)

保存