Flutter 颤振应用程序在';颤振清洁';和调试

Flutter 颤振应用程序在';颤振清洁';和调试,flutter,Flutter,我不明白为什么在我做了一次“扑动清理”之后,一切都不正常。几乎在同一时间,我不小心按下了“播放”按钮附近的“调试”按钮。但不确定是哪一个把事情搞砸了。以下是我在控制台中得到的信息: FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:processDebugGoogleServices'. > No matching client found for pac

我不明白为什么在我做了一次“扑动清理”之后,一切都不正常。几乎在同一时间,我不小心按下了“播放”按钮附近的“调试”按钮。但不确定是哪一个把事情搞砸了。以下是我在控制台中得到的信息:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugGoogleServices'.
> No matching client found for package name 'com.example.activities'

我回到Firebase,重新创建了google-services.json文件。单击添加Android应用程序后,我选择的Android软件包名称不正确。它与我制作应用程序时使用的不同

我还必须在app\build.gradle文件的默认配置{}中添加
multiDexEnabled true
。所以现在看起来像:

defaultConfig {
    applicationId "com.example.activities"
    minSdkVersion 16
    targetSdkVersion 28
    multiDexEnabled true
    versionCode flutterVersionCode.toInteger()
    versionName flutterVersionName
    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

将multiDexEnabled添加到true似乎不是一个好主意,但它现在起作用。

我认为您新使用了firebase、FCM或其他google服务。您必须添加
google服务。json
,您可以从firebase控制台将其添加到文件夹
android/app
。检查此项。您的包名称可能不匹配。