londonappbrewery / Clima-Flutter-Completed

The completed code for the Clima Project - The Complete Flutter Development Bootcamp
https://www.appbrewery.co/
95 stars 132 forks source link

Recompile with -Xlint #13

Open meshubhama01 opened 4 years ago

meshubhama01 commented 4 years ago

just clone this repo and run on android studio and run into following error.

Note: C:\src\flutter\flutter.pub-cache\hosted\pub.dartlang.org\permission_handler-3.3.0\android\src\main\java\com\baseflow\permissionhandler\PermissionHandlerPlugin.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details.

and followed by built with 401 response code .

meshubhama01 commented 4 years ago

even after changing the api key my new key still got the following error

The following _TypeError was thrown building Builder: type 'int' is not a subtype of type 'double'

The relevant error-causing widget was: MaterialApp file:///C:/Users/SHUBHAM/AndroidStudioProjects/Clima-Flutter-Completed/lib/main.dart:9:12

sandeep1dimri commented 4 years ago

even after changing the api key my new key still got the following error

The following _TypeError was thrown building Builder: type 'int' is not a subtype of type 'double'

The relevant error-causing widget was: MaterialApp file:///C:/Users/SHUBHAM/AndroidStudioProjects/Clima-Flutter-Completed/lib/main.dart:9:12

pls try if following solves your error: setState(() { double temp = (weatherData['main']['temp']).toDouble(); this.temperature = temp.toInt();

if this does not solve, pls share the code which is throwing this error.