<p dir="auto">When I build the APP through Android studio, it gets installed on phone but closes suddenly and throws following <code class="notranslate">error</code> in the Android studio console.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Launching lib/main.dart on HTC Desire 820G PLUS dual sim in debug mode...
Initializing gradle...
Resolving dependencies...
Running 'gradlew assembleDebug'...
Built build/app/outputs/apk/debug/app-debug.apk.
Installing build/app/outputs/apk/app.apk...
I/FlutterActivityDelegate(30286): onResume setting current activity to this
E/DartVM  (30286): vm-service: Error: Unhandled exception:
E/DartVM  (30286): 'dart:async/future_impl.dart': error: Unexpected tag 0 (Nothing) in ?, expected type
E/DartVM  (30286): #0      Future._thenNoZoneRegistration (dart:async/future_impl.dart:250:5)
E/DartVM  (30286): #1      _awaitHelper (dart:async/runtime/libasync_patch.dart:110:17)
E/DartVM  (30286): #2      Server.startup (dart:vmservice_io/server.dart:364:13)
E/DartVM  (30286): &lt;asynchronous suspension&gt;
E/DartVM  (30286): #3      main (dart:vmservice_io:239:12)
E/DartVM  (30286): 
E/flutter (30286): [ERROR:flutter/runtime/dart_isolate.cc(719)] Isolate (1032737077) 'vm-service' exited with an error
E/flutter (30286): [ERROR:topaz/lib/tonic/logging/dart_error.cc(16)] Unhandled exception:
E/flutter (30286): 'dart:async/future_impl.dart': error: Unexpected tag 0 (Nothing) in ?, expected type
E/flutter (30286): #0      Future._thenNoZoneRegistration (dart:async/future_impl.dart:250:5)
E/flutter (30286): #1      _awaitHelper (dart:async/runtime/libasync_patch.dart:110:17)
E/flutter (30286): #2      Server.startup (dart:vmservice_io/server.dart:364:13)
E/flutter (30286): &lt;asynchronous suspension&gt;
E/flutter (30286): #3      main (dart:vmservice_io:239:12)
Application finished.
"><pre class="notranslate"><code class="notranslate">Launching lib/main.dart on HTC Desire 820G PLUS dual sim in debug mode...
Initializing gradle...
Resolving dependencies...
Running 'gradlew assembleDebug'...
Built build/app/outputs/apk/debug/app-debug.apk.
Installing build/app/outputs/apk/app.apk...
I/FlutterActivityDelegate(30286): onResume setting current activity to this
E/DartVM  (30286): vm-service: Error: Unhandled exception:
E/DartVM  (30286): 'dart:async/future_impl.dart': error: Unexpected tag 0 (Nothing) in ?, expected type
E/DartVM  (30286): #0      Future._thenNoZoneRegistration (dart:async/future_impl.dart:250:5)
E/DartVM  (30286): #1      _awaitHelper (dart:async/runtime/libasync_patch.dart:110:17)
E/DartVM  (30286): #2      Server.startup (dart:vmservice_io/server.dart:364:13)
E/DartVM  (30286): &lt;asynchronous suspension&gt;
E/DartVM  (30286): #3      main (dart:vmservice_io:239:12)
E/DartVM  (30286): 
E/flutter (30286): [ERROR:flutter/runtime/dart_isolate.cc(719)] Isolate (1032737077) 'vm-service' exited with an error
E/flutter (30286): [ERROR:topaz/lib/tonic/logging/dart_error.cc(16)] Unhandled exception:
E/flutter (30286): 'dart:async/future_impl.dart': error: Unexpected tag 0 (Nothing) in ?, expected type
E/flutter (30286): #0      Future._thenNoZoneRegistration (dart:async/future_impl.dart:250:5)
E/flutter (30286): #1      _awaitHelper (dart:async/runtime/libasync_patch.dart:110:17)
E/flutter (30286): #2      Server.startup (dart:vmservice_io/server.dart:364:13)
E/flutter (30286): &lt;asynchronous suspension&gt;
E/flutter (30286): #3      main (dart:vmservice_io:239:12)
Application finished.

</code></pre></div>
<p dir="auto">In reference to the camera plugin <a href="https://github.com/flutter/plugins/tree/master/packages/camera">here</a></p>
<h2 dir="auto">Steps to Reproduce</h2>
<p dir="auto">For me,</p>
<ol dir="auto">
<li>Make an app</li>
<li>Get the camera package</li>
<li>Import package:camera/camera.dart</li>
</ol>
<h2 dir="auto">Logs</h2>
<p dir="auto">Android SDK built for x86 • emulator-5554                            • android-x86 • Android 8.1.0 (API 27) (emulator)<br>
Joe’s iPhone              • 12bd1a65da8516e2414d685901b4c79c34dde2ae • ios         • iOS 11.2.6</p>
<p dir="auto">When running flutter run -d 12bd1a65da8516e2414d685901b4c79c34dde2ae</p>
<p dir="auto">Running Xcode clean...                                1.3s<br>
Starting Xcode build...<br>
├─Building Dart code...                       1.4s<br>
├─Assembling Flutter resources...             2.5s<br>
└─Compiling, linking and signing...           2.4s<br>
Xcode build done                                      8.9s<br>
Failed to build iOS app<br>
Error output from Xcode build:<br>
↳<br>
** BUILD FAILED **</p>
<p dir="auto">Xcode's output:<br>
↳<br>
=== BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug ===<br>
The use of Swift 3 <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/objc/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/objc">@objc</a> inference in Swift 4 mode is deprecated. Please address deprecated <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/objc/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/objc">@objc</a> inference warnings, test your code with “Use of deprecated Swift 3 <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/objc/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/objc">@objc</a> inference” logging enabled, and then disable inference by changing the "Swift 3 <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/objc/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/objc">@objc</a> Inference" build setting to "Default" for the "Runner" target.<br>
=== BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug ===<br>
/Users/joseph/AndroidStudioProjects/science_fair_app/ios/Runner/GeneratedPluginRegistrant.m:6:9: fatal error: 'camera/CameraPlugin.h' file not found<br>
#import &lt;camera/CameraPlugin.h&gt;<br>
^~~~~~~~~~~~~~~~~~~~~~~<br>
1 error generated.<br>
Could not build the precompiled application for the device.</p>
<p dir="auto">Android devices work</p>
<p dir="auto">Running <code class="notranslate">flutter analyze</code><br>
Analyzing /Users/joseph/AndroidStudioProjects/science_fair_app...<br>
No issues found!<br>
Ran in 7.1s</p>
<h2 dir="auto">Flutter Doctor</h2>
<p dir="auto">[✓] Flutter (Channel beta, v0.1.5, on Mac OS X 10.13.2 17C88, locale en-US)<br>
• Flutter version 0.1.5 at /Users/joseph/Library/Flutter/flutter<br>
• Framework revision <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/flutter/flutter/commit/3ea4d06340a97a1e9d7cae97567c64e0569dcaa2/hovercard" href="https://github.com/flutter/flutter/commit/3ea4d06340a97a1e9d7cae97567c64e0569dcaa2"><tt>3ea4d06</tt></a> (7 days ago), 2018-02-22 11:12:39 -0800<br>
• Engine revision <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/flutter/flutter/commit/ead227f118077d1f2b57842a32abaf105b573b8a/hovercard" href="https://github.com/flutter/flutter/commit/ead227f118077d1f2b57842a32abaf105b573b8a"><tt>ead227f</tt></a><br>
• Dart version 2.0.0-dev.28.0.flutter-0b4f01f759</p>
<p dir="auto">[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)<br>
• Android SDK at /Users/joseph/Library/Android/sdk<br>
• Android NDK location not configured (optional; useful for native profiling support)<br>
• Platform android-27, build-tools 27.0.3<br>
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java<br>
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08)</p>
<p dir="auto">[✓] iOS toolchain - develop for iOS devices (Xcode 9.2)<br>
• Xcode at /Applications/Xcode.app/Contents/Developer<br>
• Xcode 9.2, Build version 9C40b<br>
• ios-deploy 1.9.2<br>
• CocoaPods version 1.4.0</p>
<p dir="auto">[✓] Android Studio (version 3.0)<br>
• Android Studio at /Applications/Android Studio.app/Contents<br>
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08)</p>
<p dir="auto">[✓] IntelliJ IDEA Ultimate Edition (version 2017.3.4)<br>
• Flutter plugin version 22.2.2<br>
• Dart plugin version 173.4127.31</p>
<p dir="auto">[✓] Connected devices (2 available)</p>