title: java.lang.NullPointerException when Running Flutter App
body: <p>I'm getting the below error when running an opensource Flutter app that I checked out from Github. It runs the first Activity of the screen and after about 1-second app crashes with the following error in Logcat. I'm not able to see any errors in Run console of Flutter.</p>
  
  <pre><code>Process: app.ceylon.selftrackingapp, PID: 32590
      java.lang.RuntimeException: Unable to start activity ComponentInfo{app.ceylon.selftrackingapp/app.ceylon.selftrackingapp.MainActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'void io.flutter.plugin.common.BinaryMessenger.setMessageHandler(java.lang.String, io.flutter.plugin.common.BinaryMessenger$BinaryMessageHandler)' on a null object reference
          at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3448)
          at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3595)
          at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
          at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
          at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2147)
          at android.os.Handler.dispatchMessage(Handler.java:107)
          at android.os.Looper.loop(Looper.java:237)
          at android.app.ActivityThread.main(ActivityThread.java:7811)
          at java.lang.reflect.Method.invoke(Native Method)
          at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1076)
       Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'void io.flutter.plugin.common.BinaryMessenger.setMessageHandler(java.lang.String, io.flutter.plugin.common.BinaryMessenger$BinaryMessageHandler)' on a null object reference
          at io.flutter.plugin.common.MethodChannel.setMethodCallHandler(MethodChannel.java:116)
          at com.baseflow.geolocator.GeolocatorPlugin.registerWith(GeolocatorPlugin.java:49)
          at io.flutter.plugins.GeneratedPluginRegistrant.registerWith(GeneratedPluginRegistrant.java:20)
          at app.ceylon.selftrackingapp.MainActivity.onCreate(MainActivity.kt:32)
          at android.app.Activity.performCreate(Activity.java:7955)
          at android.app.Activity.performCreate(Activity.java:7944)
          at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1307)
          at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3423)
          at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3595) 
          at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83) 
          at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) 
          at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) 
          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2147) 
          at android.os.Handler.dispatchMessage(Handler.java:107) 
          at android.os.Looper.loop(Looper.java:237) 
          at android.app.ActivityThread.main(ActivityThread.java:7811) 
          at java.lang.reflect.Method.invoke(Native Method) 
          at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) 
          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1076) 
  2020-03-21 10:09:53.328 15534-15539/? E/nightwatch-watcher: Failed to read from logcat: Success
  </code></pre>
  
  <p>I'm using an actual device Galaxy S9+ for testing and here is the Flutter version that I have installed in my computer.</p>
  
  <pre><code>Flutter 1.15.17 • channel beta • https://github.com/flutter/flutter.git
  Framework • revision 2294d75bfa (2 weeks ago) • 2020-03-07 00:28:38 +0900
  Engine • revision 5aff311948
  Tools • Dart 2.8.0 (build 2.8.0-dev.12.0 9983424a3c)
  </code></pre>