title: How to clean your build with Flutter RP2 in Android Studio?
body: <p>With the release of FLutter Release Preview 2 using Android Studio 3.1.4 my project has sporadic build issues when I stop the program from Android Studio with the command stop 'main.dart' (command f2) and then do a run 'main.dart' (^R) I get the error listed below. Yet if I totally close Android Studio and open the project again, it compiles and runs correctly without the error.  I'm wondering if there is a way to clean the project to elevate having to close and open Android Studio, this is sort of counter productive to Flutter hot reload.</p>
  
  <p>Here's the Android Studio error that I get:</p>
  
  <p>Launching lib/main.dart on Android SDK built for x86 in debug mode...
  [{"event":"app.progress","params":{"appId":"04e99281-55ea-41cd-851f-5b07487c5302","id":"0","progressId":null,"message":"Initializing gradle..."}}]Initializing gradle...</p>
  
  <p>Resolving dependencies...
  Running 'gradlew assembleDebug'...
  <em>registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
  registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
  registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
  registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
  registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
  compiler message: lib/ui/loginScreen.dart:1:1: Error: Can't access platform private library.
  compiler message: import 'dart:_http';
  compiler message: ^
  Compiler failed on /Users/pbirdsall/Documents/highline/hl_leverage/lib/main.dart</em></p>
  
  <p>FAILURE: Build failed with an exception.</p>
  
  <ul>
  <li><p>Where:
  Script '/Users/pbirdsall/flutter/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 460</p></li>
  <li><p>What went wrong:
  Execution failed for task ':app:flutterBuildDebug'.</p>
  
  <blockquote>
    <p>Process 'command '/Users/pbirdsall/flutter/flutter/bin/flutter'' finished with non-zero exit value 1</p>
  </blockquote></li>
  <li><p>Try:
  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.</p></li>
  <li><p>Get more help at <a href="https://help.gradle.org" rel="noreferrer">https://help.gradle.org</a></p></li>
  </ul>
  
  <p>BUILD FAILED in 8s
  Finished with error: Gradle build failed: 1</p>
  
  <p>You can ignore the following part of the error log (in italics above), as this occurs on a successful execution of the program.</p>
  
  <p>deprecated, use registerGeneratedFolders(FileCollection) registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection) registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection) registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection) registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection) compiler message: lib/ui/loginScreen.dart:1:1: Error: Can't access platform private library. compiler message: import 'dart:_http'; compiler message: ^ Compiler failed on </p>
  
  <p>My version of Android Studio is 3.1.4</p>
  
  <p>My version of Flutter is: </p>
  
  <p>Flutter 0.8.2 • channel beta • <a href="https://github.com/flutter/flutter.git" rel="noreferrer">https://github.com/flutter/flutter.git</a>
  Framework • revision 5ab9e70727 (2 weeks ago) • 2018-09-07 12:33:05 -0700
  Engine • revision 58a1894a1c
  Tools • Dart 2.1.0-dev.3.1.flutter-760a9690c2</p>
  
  <p>I'm running on macOS High Sierra 10.13.6</p>