Gradle:Flutter升级后,assembleDebug任务失败

时间:2019-06-29 12:07:08

标签: firebase gradle flutter dart

当我在控制台中看到一条消息时,我正在开发Flutter应用程序:“ 新版本的Flutter可用”。因此,我升级了颤动(CollapsibleToolbar.kt /* * Copyright (C) 2018 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package foo.bar import android.content.Context import android.util.AttributeSet import androidx.constraintlayout.motion.widget.MotionLayout import com.google.android.material.appbar.AppBarLayout class CollapsibleToolbar @JvmOverloads constructor( context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0 ) : MotionLayout(context, attrs, defStyleAttr), AppBarLayout.OnOffsetChangedListener { override fun onOffsetChanged(appBarLayout: AppBarLayout?, verticalOffset: Int) { progress = -verticalOffset / appBarLayout?.totalScrollRange?.toFloat()!! } override fun onAttachedToWindow() { super.onAttachedToWindow() (parent as? AppBarLayout)?.addOnOffsetChangedListener(this) } } )。而当我改变我的应用程序时,会出现此错误:

flutter upgrade

我的代码中没有Launching lib\main.dart on Redmi Note 6 Pro in debug mode... Initializing gradle... [{"event":"app.progress","params":{"appId":"cbe486eb-0534b8c4cb74","id":"1","progressId":null,"message":"Resolving dependencies..."}}]Resolving dependencies... Running Gradle task 'assembleDebug'... registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection) registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection) registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection) registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection) registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection) Finished with error: Gradle task assembleDebug failed with exit code 1 。它可能来自库(可能是firebase / cloud_firestore)。也可能与AndroidX相关。

我在其他主题或网站上找不到任何解决方案。

任何想法都很棒!

1 个答案:

答案 0 :(得分:0)

只需在下面下载android的最新版本,即可同步您并发现错误,然后单击它,同步将安装并更新Gradle Build:

enter image description here

相关问题