Yasil
Yasil

Reputation: 1

I am upgraded my old flutter to latest version , how can solve this errors?

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(null-error, Host platform returned null value for non-null return value., null, null)

I am flutter upgraded after I am facing this problems how can help me

Upvotes: 0

Views: 87

Answers (1)

Harsh Moradiya
Harsh Moradiya

Reputation: 286

Check for Flutter and Plugin Updates:

Make sure you are using the latest version of Flutter and your plugins. Run flutter doctor and ensure that your Flutter environment is up to date. You might need to update Flutter or certain packages. Clean and Rebuild Your Project:

Sometimes, issues can be resolved by cleaning the project and rebuilding it. You can do this by running:

flutter clean
flutter pub get
flutter pub upgrade
flutter run

Dependencies to be added in Project Level 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
    ...
  }
}

I hope this will help you.

Upvotes: 0

Related Questions