gradle - 位置信息包出现错误。怎么修?

标签 gradle flutter error-handling package location

我正在尝试获取软件包:

location: ^2.3.5

当我尝试运行该应用程序时,不断出现此错误:
Launching lib\main.dart on Android SDK built for x86 64 in debug mode...
* Error running Gradle:
ProcessException: Process "C:\Users\WinDows\Desktop\Flutter_Work\flutter_app\android\gradlew.bat" exited abnormally:

> Configure project :app
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
WARNING: API 'variant.getJavaCompile()' is obsolete and has been replaced with 'variant.getJavaCompileProvider()'.
It will be removed at the end of 2019.
For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
To determine what is calling variant.getJavaCompile(), use -Pandroid.debug.obsoleteApi=true on the command line to display a stack trace.
WARNING: API 'variant.getMergeAssets()' is obsolete and has been replaced with 'variant.getMergeAssetsProvider()'.
It will be removed at the end of 2019.
For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
To determine what is calling variant.getMergeAssets(), use -Pandroid.debug.obsoleteApi=true on the command line to display a stack trace.
WARNING: API 'variantOutput.getProcessResources()' is obsolete and has been replaced with 'variantOutput.getProcessResourcesProvider()'.
It will be removed at the end of 2019.
For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
To determine what is calling variantOutput.getProcessResources(), use -Pandroid.debug.obsoleteApi=true on the command line to display a stack trace.
         *********************************************************
WARNING: This version of image_picker will break your Android build if it or its dependencies aren't compatible with AndroidX.
         See [enter link description here][1] for more information on the problem and how to fix it.
         This warning prints for all Android build failures. The real root cause of the error may be unrelated.
         *********************************************************

FAILURE: Build failed with an exception.

* What went wrong:
The Android Gradle plugin supports only Kotlin Gradle plugin version 1.3.0 and higher.
The following dependencies do not satisfy the required version:
root project 'android' -> 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 3s
  Command: C:\Users\WinDows\Desktop\Flutter_Work\flutter_app\android\gradlew.bat app:properties

Please review your Gradle project setup in the android/ folder.
Exited (sigterm)

这是我在android文件夹中的build.gradle:
dependencies {
        classpath 'com.android.tools.build:gradle:3.3.0'
        classpath 'com.google.gms:google-services:4.2.0'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }

这是我的gradle.properties:
android.enableJetifier=true
android.useAndroidX=true
org.gradle.jvmargs=-Xmx1536M

然后将此代码导入我的AndroidMainfest中:
   <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

我确实添加了程序包的要求,但我的应用程序停止运行...

最佳答案

对于您的依赖

dependencies {
        classpath 'com.android.tools.build:gradle:3.3.0'
        classpath 'com.google.gms:google-services:4.2.0'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }

只需将build.gradle文件中的kotlin版本更改为“1.3.0”以上即可。喜欢,
ext.kotlin_version = '1.3.31'

这样就完成了。

关于gradle - 位置信息包出现错误。怎么修?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58644516/

相关文章:

gradle - gradle 构建如何知道哪些模块已更改?

flutter - 我需要有关如何保存应用状态的指南。

php - 自定义错误处理程序函数中的error_level和error_message来自何处以及如何出现?

properties - 正确设置 gradle 属性的默认值

gradle - 根据Gradle中的构建类型更新值

android - Flutter Android - Gradle 任务 bundleRelease 失败,退出代码为 1

error-handling - 只要 SailsJS 出现错误,Sails 服务器就会关闭

c++ - OpenGL不报告着色器编译器错误

gradle - 如何在复合项目中递归执行构建?

dart - 有没有办法限制 Navigation Stack 在 Flutter App 中可以维护的页面数量?