<p dir="auto">When I run flutter doctor, "Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses" is the only thing it's cranky about. When I run the command, and hit "y" to accept each license and rerun flutter doctor, it still complains about the android licenses.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="flutter doctor -v
[√] Flutter (Channel beta, v0.2.3, on Microsoft Windows [Version 10.0.16299.309], locale en-US)
    • Flutter version 0.2.3
    • Framework revision 5a58b36e36 (2 weeks ago), 2018-03-13 13:20:13 -0700
    • Engine revision e61bb9ac3a
    • Dart version 2.0.0-dev.35.flutter-290c576264

[!] Android toolchain - develop for Android devices (Android SDK 27.0.3)
    • Android SDK
    • Android NDK
    • Platform android-27, build-tools 27.0.3
    • ANDROID_HOME
    • Java binary
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)
    X Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses

[√] Android Studio (version 3.1)
    • Android Studio
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)

[√] VS Code, 64-bit edition (version 1.21.1)
    • VS Code
    • Dart Code extension version 2.11.1

[!] Connected devices
    ! No devices available

! Doctor found issues in 2 categories."><pre class="notranslate"><code class="notranslate">flutter doctor -v
[√] Flutter (Channel beta, v0.2.3, on Microsoft Windows [Version 10.0.16299.309], locale en-US)
    • Flutter version 0.2.3
    • Framework revision 5a58b36e36 (2 weeks ago), 2018-03-13 13:20:13 -0700
    • Engine revision e61bb9ac3a
    • Dart version 2.0.0-dev.35.flutter-290c576264

[!] Android toolchain - develop for Android devices (Android SDK 27.0.3)
    • Android SDK
    • Android NDK
    • Platform android-27, build-tools 27.0.3
    • ANDROID_HOME
    • Java binary
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)
    X Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses

[√] Android Studio (version 3.1)
    • Android Studio
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)

[√] VS Code, 64-bit edition (version 1.21.1)
    • VS Code
    • Dart Code extension version 2.11.1

[!] Connected devices
    ! No devices available

! Doctor found issues in 2 categories.
</code></pre></div>
<p dir="auto">I posted the same thing on the Google groups for flutter, and it was suggested this is a bug and that I should post it here.</p>
<h2 dir="auto">Steps to Reproduce</h2>
<blockquote>
<p dir="auto">Please tell us what you were doing and what went wrong. If you are running flutter tools from the command line, please try adding the <code class="notranslate">-v</code> or <code class="notranslate">--verbose</code> option to gather more information.</p>
</blockquote>
<ol dir="auto">
<li>Run <code class="notranslate">flutter upgrade</code>.</li>
</ol>
<p dir="auto"><strong>What went wrong</strong></p>
<blockquote>
<p dir="auto"><strong>✗ Android license status unknown.</strong></p>
</blockquote>
<p dir="auto"><strong>What should happen</strong><br>
There shouldn't be a problem. The build from last week did not output a problem, and this week's build shouldn't output a problem.</p>
<p dir="auto"><strong>What I tried to fix the problem</strong></p>
<ol dir="auto">
<li>Upgraded Android Studio</li>
<li>Added a few random SDK in the SDK Manager</li>
<li><code class="notranslate">sudo chown -R $USER:$USER /opt/*</code></li>
<li><code class="notranslate">flutter doctor --android-licenses</code></li>
</ol>
<blockquote>
<p dir="auto"><del>If the problem is with your application's rendering, please attach a screenshot and any relevant source code.</del><br>
<del>If you are getting an exception in the logs, and your code is implicated in the first few frames, then please include the source code for the functions involved.</del></p>
</blockquote>
<h2 dir="auto">Logs</h2>
<blockquote>
<p dir="auto">Run your application with <code class="notranslate">flutter run</code> and attach all the log output.</p>
</blockquote>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Launching lib/main.dart on Nexus 5 in debug mode...
Initializing gradle...                                       0.8s
Resolving dependencies...                                   11.8s
Running 'gradlew assembleDebug'...                           4.7s
Built build/app/outputs/apk/debug/app-debug.apk (26.9MB)."><pre class="notranslate">Launching lib/main.dart on Nexus 5 <span class="pl-k">in</span> debug mode...
Initializing gradle...                                       0.8s
Resolving dependencies...                                   11.8s
Running <span class="pl-s"><span class="pl-pds">'</span>gradlew assembleDebug<span class="pl-pds">'</span></span>...                           4.7s
Built build/app/outputs/apk/debug/app-debug.apk (26.9MB).</pre></div>
<p dir="auto">The app then opens in the device and immediately crashes.</p>
<blockquote>
<p dir="auto">Run <code class="notranslate">flutter analyze</code> and attach any output of that command also.</p>
</blockquote>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Analyzing /home/users/n.gendron/GitLab/n.gendron/techno_store...
  lint • Close instances of `dart.core.Sink` at lib/server.dart:10:20 • close_sinks
  hint • 'BASE64' is deprecated and shouldn't be used at lib/edit.dart:85:9 • deprecated_member_use
  hint • 'JSON' is deprecated and shouldn't be used at lib/globals.dart:70:12 • deprecated_member_use
  hint • 'JSON' is deprecated and shouldn't be used at lib/globals.dart:80:19 • deprecated_member_use
  hint • 'BASE64' is deprecated and shouldn't be used at lib/item.dart:83:11 • deprecated_member_use
  hint • 'JSON' is deprecated and shouldn't be used at lib/server.dart:50:36 • deprecated_member_use
  hint • 'JSON' is deprecated and shouldn't be used at lib/server.dart:129:17 • deprecated_member_use
7 issues found.
(Ran in 8.2s)"><pre class="notranslate">Analyzing /home/users/n.gendron/GitLab/n.gendron/techno_store...
  lint • Close instances of <span class="pl-s"><span class="pl-pds">`</span>dart.core.Sink<span class="pl-pds">`</span></span> at lib/server.dart:10:20 • close_sinks
  hint • <span class="pl-s"><span class="pl-pds">'</span>BASE64<span class="pl-pds">'</span></span> is deprecated and shouldn<span class="pl-s"><span class="pl-pds">'</span>t be used at lib/edit.dart:85:9 • deprecated_member_use</span>
<span class="pl-s">  hint • <span class="pl-pds">'</span></span>JSON<span class="pl-s"><span class="pl-pds">'</span> is deprecated and shouldn<span class="pl-pds">'</span></span>t be used at lib/globals.dart:70:12 • deprecated_member_use
  hint • <span class="pl-s"><span class="pl-pds">'</span>JSON<span class="pl-pds">'</span></span> is deprecated and shouldn<span class="pl-s"><span class="pl-pds">'</span>t be used at lib/globals.dart:80:19 • deprecated_member_use</span>
<span class="pl-s">  hint • <span class="pl-pds">'</span></span>BASE64<span class="pl-s"><span class="pl-pds">'</span> is deprecated and shouldn<span class="pl-pds">'</span></span>t be used at lib/item.dart:83:11 • deprecated_member_use
  hint • <span class="pl-s"><span class="pl-pds">'</span>JSON<span class="pl-pds">'</span></span> is deprecated and shouldn<span class="pl-s"><span class="pl-pds">'</span>t be used at lib/server.dart:50:36 • deprecated_member_use</span>
<span class="pl-s">  hint • <span class="pl-pds">'</span></span>JSON<span class="pl-s"><span class="pl-pds">'</span> is deprecated and shouldn<span class="pl-pds">'</span></span>t be used at lib/server.dart:129:17 • deprecated_member_use
7 issues found.
(Ran <span class="pl-k">in</span> 8.2s)</pre></div>
<p dir="auto">Oh, what happened the last two days?</p>
<h2 dir="auto">Flutter Doctor</h2>
<blockquote>
<p dir="auto">Paste the output of running <code class="notranslate">flutter doctor -v</code> here.</p>
</blockquote>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="[✓] Flutter (Channel beta, v0.2.3, on Linux, locale en_US.UTF-8)
    • Flutter version 0.2.3 at /home/users/n.gendron/GitHub/flutter
    • Framework revision 5a58b36e36 (2 weeks ago), 2018-03-13 13:20:13 -0700
    • Engine revision e61bb9ac3a
    • Dart version 2.0.0-dev.35.flutter-290c576264

[!] Android toolchain - develop for Android devices (Android SDK 27.0.3)
    • Android SDK at /opt/android-sdk/
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-27, build-tools 27.0.3
    • ANDROID_HOME = /opt/android-sdk/
    • Java binary at: /opt/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
    ✗ Android license status unknown.

[✓] Android Studio (version 3.1)
    • Android Studio at /opt/android-studio
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)

[✓] Connected devices (1 available)
    • Nexus 5 • 05473ea90a673764 • android-arm • Android 7.1.2 (API 25)

! Doctor found issues in 1 category."><pre class="notranslate">[✓] Flutter (Channel beta, v0.2.3, on Linux, locale en_US.UTF-8)
    • Flutter version 0.2.3 at /home/users/n.gendron/GitHub/flutter
    • Framework revision 5a58b36e36 (2 weeks ago), 2018-03-13 13:20:13 -0700
    • Engine revision e61bb9ac3a
    • Dart version 2.0.0-dev.35.flutter-290c576264

[<span class="pl-k">!</span>] Android toolchain - develop <span class="pl-k">for</span> Android devices (Android SDK 27.0.3)
    • Android SDK at /opt/android-sdk/
    • Android NDK location not configured (optional<span class="pl-k">;</span> useful <span class="pl-k">for</span> native profiling support)
    • Platform android-27, build-tools 27.0.3
    • ANDROID_HOME = /opt/android-sdk/
    • Java binary at: /opt/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
    ✗ Android license status unknown.

[✓] Android Studio (version 3.1)
    • Android Studio at /opt/android-studio
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)

[✓] Connected devices (1 available)
    • Nexus 5 • 05473ea90a673764 • android-arm • Android 7.1.2 (API 25)

<span class="pl-k">!</span> Doctor found issues <span class="pl-k">in</span> 1 category.</pre></div>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="flutter doctor --android-licenses
Warning: java.net.ConnectException: Connection timed out (Connection timed out) 
Warning: Failed to download any source lists! Fetch remote repository...        
Warning: File /home/users/n.gendron/.android/repositories.cfg could not be loaded.
All SDK package licenses accepted.======] 100% Computing updates... "><pre class="notranslate">flutter doctor --android-licenses
Warning: java.net.ConnectException: Connection timed out (Connection timed out) 
Warning: Failed to download any <span class="pl-c1">source</span> lists<span class="pl-k">!</span> Fetch remote repository...        
Warning: File /home/users/n.gendron/.android/repositories.cfg could not be loaded.
All SDK package licenses accepted.======] 100% Computing updates... </pre></div>
<blockquote>
<p dir="auto">For more information about diagnosing and reporting Flutter bugs, please see <a href="https://flutter.io/bug-reports/" rel="nofollow">https://flutter.io/bug-reports/</a>.</p>
</blockquote>
<p dir="auto"><strong>Edit :</strong> Oh hey, I forgot to add some info about my system. It should probably be noted somewhere in the template to add it.</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="OS: Ubuntu 16.04.4 LTS x86_64 
Kernel: 4.13.0-38-generic 
Uptime: 17 hours, 31 mins 
Packages: 3069 
Shell: bash 4.3.48 
Resolution: 1024x768, 1920x1080 
DE: GNOME 3.18.5 
WM: GNOME Shell 
WM Theme: Adwaita 
Theme: Greybird [GTK2/3] 
Icons: Elementary-xfce-darker [GTK2/3] 
CPU: Intel i5 660 (4) @ 2.035GHz 
GPU: NVIDIA GeForce 8400 GS Rev. 2 
Memory: 4576MiB / 7840MiB "><pre class="notranslate"><span class="pl-ent">OS</span>: <span class="pl-s">Ubuntu 16.04.4 LTS x86_64 </span>
<span class="pl-ent">Kernel</span>: <span class="pl-s">4.13.0-38-generic </span>
<span class="pl-ent">Uptime</span>: <span class="pl-s">17 hours, 31 mins </span>
<span class="pl-ent">Packages</span>: <span class="pl-c1">3069</span> 
<span class="pl-ent">Shell</span>: <span class="pl-s">bash 4.3.48 </span>
<span class="pl-ent">Resolution</span>: <span class="pl-s">1024x768, 1920x1080 </span>
<span class="pl-ent">DE</span>: <span class="pl-s">GNOME 3.18.5 </span>
<span class="pl-ent">WM</span>: <span class="pl-s">GNOME Shell </span>
<span class="pl-ent">WM Theme</span>: <span class="pl-s">Adwaita </span>
<span class="pl-ent">Theme</span>: <span class="pl-s">Greybird [GTK2/3] </span>
<span class="pl-ent">Icons</span>: <span class="pl-s">Elementary-xfce-darker [GTK2/3] </span>
<span class="pl-ent">CPU</span>: <span class="pl-s">Intel i5 660 (4) @ 2.035GHz </span>
<span class="pl-ent">GPU</span>: <span class="pl-s">NVIDIA GeForce 8400 GS Rev. 2 </span>
<span class="pl-ent">Memory</span>: <span class="pl-s">4576MiB / 7840MiB </span></pre></div>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="java -version
openjdk version &quot;1.8.0_151&quot;
OpenJDK Runtime Environment (build 1.8.0_151-8u151-b12-0ubuntu0.16.04.2-b12)
OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)"><pre class="notranslate">java -version
openjdk version <span class="pl-s"><span class="pl-pds">"</span>1.8.0_151<span class="pl-pds">"</span></span>
OpenJDK Runtime Environment (build 1.8.0_151-8u151-b12-0ubuntu0.16.04.2-b12)
OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)</pre></div>
<p dir="auto"><strong>Edit :</strong> Most people stumbling here had a different problem from the one I had, <a href="https://github.com/flutter/flutter/issues/16025#issuecomment-468009198" data-hovercard-type="issue" data-hovercard-url="/flutter/flutter/issues/16025/hovercard">and its solution is here</a>.</p>
<blockquote>
<p dir="auto">Modify <code class="notranslate">sdkmanager</code> to use Java 8 by setting <code class="notranslate">JAVA_HOME</code> <em>inside</em> <code class="notranslate">sdkmanager</code> to a Java 8 installation. It's, by default, at <code class="notranslate">~/Android/Sdk/tools/bin/sdkmanager</code>.</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# Add default JVM options here. You can also use JAVA_OPTS and SDKMANAGER_OPTS to pass JVM options $
JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64
DEFAULT_JVM_OPTS='&quot;-Dcom.android.sdklib.toolsdir=$APP_HOME&quot; -XX:+IgnoreUnrecognizedVMOptions'"><pre class="notranslate"><span class="pl-c"><span class="pl-c">#</span> Add default JVM options here. You can also use JAVA_OPTS and SDKMANAGER_OPTS to pass JVM options $</span>
JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64
DEFAULT_JVM_OPTS=<span class="pl-s"><span class="pl-pds">'</span>"-Dcom.android.sdklib.toolsdir=$APP_HOME" -XX:+IgnoreUnrecognizedVMOptions<span class="pl-pds">'</span></span></pre></div>
<div class="highlight highlight-source-batchfile notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="@rem Add default JVM options here. You can also use JAVA_OPTS and SDKMANAGER_OPTS to pass JVM options to this script.
set JAVA_HOME=&quot;C:\ProgramData\scoop\apps\android-studio\current\jre&quot;
set DEFAULT_JVM_OPTS=&quot;-Dcom.android.sdklib.toolsdir=%~dp0\..&quot;"><pre class="notranslate"><span class="pl-k">@</span><span class="pl-c"><span class="pl-k">rem</span> Add default JVM options here. You can also use JAVA_OPTS and SDKMANAGER_OPTS to pass JVM options to this script.</span>
<span class="pl-k">set</span> <span class="pl-smi">JAVA_HOME</span><span class="pl-k">=</span><span class="pl-s"><span class="pl-pds">"</span>C:\ProgramData\scoop\apps\android-studio\current\jre<span class="pl-pds">"</span></span>
<span class="pl-k">set</span> <span class="pl-smi">DEFAULT_JVM_OPTS</span><span class="pl-k">=</span><span class="pl-s"><span class="pl-pds">"</span>-Dcom.android.sdklib.toolsdir=<span class="pl-v">%~dp0</span>\..<span class="pl-pds">"</span></span></pre></div>
<p dir="auto">This way, you can keep using a sane and maintained version of Java on your system while simultaneously using <code class="notranslate">sdkmanager</code>.</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# Java
export JAVA_HOME=/usr/lib/jvm/default-java"><pre class="notranslate"><span class="pl-c"><span class="pl-c">#</span> Java</span>
<span class="pl-k">export</span> JAVA_HOME=/usr/lib/jvm/default-java</pre></div>
<p dir="auto">And now I've got some <a href="https://user-images.githubusercontent.com/10495562/53575275-3504db80-3b3f-11e9-810a-ca49ef9373c4.png" rel="nofollow">pipelines</a> to repair.</p>
</blockquote>