[错误:flutter/runtime/dart_vm_initializer.cc(41)]无法处理的异常:PlatformException(null-error,Host platform returned null value for non-null return value.,null,null) 我是扑升级后,我面临着这个问题,如何能帮助我
flutter clean
flutter pub get
flutter pub upgrade
flutter run
要在项目级build.gradle中添加的权限:
buildscript {
repositories {
// Check that you have the following line (if not, add it):
google() // Google's Maven repository
}
dependencies {
...
// Add this line
classpath 'com.google.gms:google-services:4.3.13'
}
}
allprojects {
...
repositories {
// Check that you have the following line (if not, add it):
google() // Google's Maven repository
...
}
}
1条答案
按热度按时间pgpifvop1#
检查Flutter和插件更新:
请确保您使用的是最新版本的Flutter和您的插件。运行flutter doctor并确保您的Flutter环境是最新的。您可能需要更新Flutter或某些软件包。清理和重建您的项目:
有时,问题可以通过清理项目并重新生成来解决。您可以通过运行以下命令来执行此操作:
要在项目级build.gradle中添加的权限:
我希望这对你有帮助。