royarg02 / soil_moisture_app

An application to monitor and display soil moisture content for drip irrigation.
GNU General Public License v3.0
16 stars 7 forks source link

Build fails on Flutter v1.17+ #23

Open royarg02 opened 4 years ago

royarg02 commented 4 years ago

Running flutter run on v1.0.3 results in compilation error:

Compiler message:
/home/anurag/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_charts-1.0.0-beta.4/lib/src/common/user_interaction/t
ooltip.dart:312:32: Error: Constant evaluation error:
    _painter.getLocation(const Offset(null, null));                     
                               ^                                        
org-dartlang-sdk:///flutter/lib/ui/geometry.dart:16:9: Context: This assertion failed.
  const OffsetBase(double dx, double dy)                                
        ^                                                               

Compiler message:                                                       
/home/anurag/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_charts-1.0.0-beta.4/lib/src/common/user_interaction/tooltip.dart:312:32: Error: Constant evaluation error:
    _painter.getLocation(const Offset(null, null));                     
                               ^                                        
org-dartlang-sdk:///flutter/lib/ui/geometry.dart:16:9: Context: This assertion failed.
  const OffsetBase(double dx, double dy)                                
        ^                                                               
Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
build failed.                                                           

FAILURE: Build failed with an exception.                                

* Where:                                                                
Script '/home/anurag/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 882

* What went wrong:                                                      
Execution failed for task ':app:compileFlutterBuildDebug'.              
> Process 'command '/home/anurag/flutter/bin/flutter'' finished with non-zero exit value 1

* Try:                                                                  
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org                              

BUILD FAILED in 19s

The issue seems to be related to syncfusion_flutter_charts package: https://github.com/RoyARG02/soil_moisture_app/blob/fef3e73b2a24079817ca77b7aecf883b4a0bed5c/pubspec.yaml#L13 Considering that the app is using a beta version of the package. We need to either:

A viable alternative could be the charts_flutter package.

royarg02 commented 4 years ago

Issue has been fixed on the stable release(v1.1.0) as of commit 50c63f1d33d9b38b1a87988692ab79ce60cd791b.