<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: idawnwon</title>
    <description>The latest articles on DEV Community by idawnwon (@idawnwon).</description>
    <link>https://dev.to/idawnwon</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F471091%2Fe7ef42ee-eda7-4301-a22d-97a061815175.png</url>
      <title>DEV Community: idawnwon</title>
      <link>https://dev.to/idawnwon</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/idawnwon"/>
    <language>en</language>
    <item>
      <title>Docker | Which network is your container running under?</title>
      <dc:creator>idawnwon</dc:creator>
      <pubDate>Tue, 02 Mar 2021 02:57:57 +0000</pubDate>
      <link>https://dev.to/idawnwon/docker-which-network-is-your-container-running-under-4e03</link>
      <guid>https://dev.to/idawnwon/docker-which-network-is-your-container-running-under-4e03</guid>
      <description>&lt;p&gt;I use docker-composer created 4 containers: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;phpmyadmin&lt;/li&gt;
&lt;li&gt;wordpress&lt;/li&gt;
&lt;li&gt;mariadb&lt;/li&gt;
&lt;li&gt;worker
to simulate a cluster.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The &lt;code&gt;worker&lt;/code&gt; container should publish read/edit WordPress posts through REST api, so the first thing I have to know is the IP address of &lt;code&gt;wordpress&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker inspect --format='{{json .NetworkSettings.Networks}}' wordpress
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;got this:&lt;br&gt;
&lt;code&gt;{"test4_default":{"IPAMConfig":null,"Links":null,"Aliases":["wordpress","3c643dafbb8a"],"NetworkID":"5a0f08a9dda9e1649a50568c697753c8b04277cf4fff73450aeef90bbceab2b4","EndpointID":"6513b7a1cc85f59bac846e979dd2226057654667c27cfeec0fffad505caa5bb7","Gateway":"192.168.80.1","IPAddress":"192.168.80.5","IPPrefixLen":20,"IPv6Gateway":"","GlobalIPv6Address":"","GlobalIPv6PrefixLen":0,"MacAddress":"02:42:c0:a8:50:05","DriverOpts":null}}&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' wordpress
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;got the ip:&lt;br&gt;
&lt;code&gt;192.168.80.5&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Hope this helps!&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;So proud to be a coder!&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>docker</category>
    </item>
    <item>
      <title>Docker Network Error</title>
      <dc:creator>idawnwon</dc:creator>
      <pubDate>Tue, 02 Mar 2021 01:35:03 +0000</pubDate>
      <link>https://dev.to/idawnwon/docker-network-error-40eb</link>
      <guid>https://dev.to/idawnwon/docker-network-error-40eb</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ERROR: could not find an available, non-overlapping IPv4 address pool among the defaults to assign to the network
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I got this error, then run &lt;code&gt;docker network ls&lt;/code&gt;, 32 lines of network list showed up.&lt;/p&gt;

&lt;p&gt;Exclude &lt;code&gt;host&lt;/code&gt;, there are 31 uses DRIVER &lt;code&gt;bridge&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;I removed some old ones with &lt;code&gt;docker network rm&lt;/code&gt;.&lt;/p&gt;

</description>
      <category>docker</category>
    </item>
    <item>
      <title>Flutter | Rectangular icons are centred incorrectly</title>
      <dc:creator>idawnwon</dc:creator>
      <pubDate>Fri, 22 Jan 2021 14:44:29 +0000</pubDate>
      <link>https://dev.to/idawnwon/flutter-rectangular-icons-are-centred-incorrectly-43ap</link>
      <guid>https://dev.to/idawnwon/flutter-rectangular-icons-are-centred-incorrectly-43ap</guid>
      <description>&lt;p&gt;I created an app logo in Sketch. Since in my design, it will be always in mono colour. So, embed it in to an icon font along with other app icons is not a bad idea.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7qxUGJ0U--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/visec45g0zw5tc1931zg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7qxUGJ0U--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/visec45g0zw5tc1931zg.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I followed &lt;a href="https://medium.com/@emv_tech/add-custom-font-icons-to-a-flutter-project-12bddb841d7"&gt;Emvolution Germany's post in medium.com&lt;/a&gt;, worked fine, but a bit weird:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5fbqAmbj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ivs0p1wvmj26phaoe986.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5fbqAmbj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ivs0p1wvmj26phaoe986.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The snippet:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;        &lt;span class="o"&gt;...&lt;/span&gt;
          &lt;span class="nl"&gt;child:&lt;/span&gt; &lt;span class="n"&gt;Column&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;
            &lt;span class="nl"&gt;mainAxisAlignment:&lt;/span&gt; &lt;span class="n"&gt;MainAxisAlignment&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;center&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
            &lt;span class="nl"&gt;crossAxisAlignment:&lt;/span&gt; &lt;span class="n"&gt;CrossAxisAlignment&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;center&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
            &lt;span class="nl"&gt;children:&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;
              &lt;span class="n"&gt;Icon&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;AwesomeIcons&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;logo&lt;/span&gt;&lt;span class="o"&gt;),&lt;/span&gt;
              &lt;span class="o"&gt;...&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Googled, found the same &lt;a href="https://github.com/fluttercommunity/font_awesome_flutter/issues/23"&gt;issue commented by bartektartanus on Github&lt;/a&gt;. It seems that rectangular icons do have centring problem.&lt;/p&gt;

&lt;p&gt;I got a workaround:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;        &lt;span class="o"&gt;...&lt;/span&gt;       
              &lt;span class="n"&gt;Text&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;
                &lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="err"&gt;\&lt;/span&gt;&lt;span class="s"&gt;ue800"&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// the code point of the logo&lt;/span&gt;
                &lt;span class="nl"&gt;style:&lt;/span&gt; &lt;span class="n"&gt;TextStyle&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;fontFamily:&lt;/span&gt; &lt;span class="s"&gt;'Howaii2'&lt;/span&gt;&lt;span class="o"&gt;),&lt;/span&gt;
              &lt;span class="o"&gt;),&lt;/span&gt;

              &lt;span class="o"&gt;...&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;e800&lt;/code&gt; is the code point, add &lt;code&gt;\u&lt;/code&gt; before it.&lt;br&gt;
Result:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zEcKst8Y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/wj3kvi5huxr2vh3t11kv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zEcKst8Y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/wj3kvi5huxr2vh3t11kv.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Another workaround according to &lt;a href="https://github.com/flutter/flutter/issues/24054#issuecomment-439167235"&gt;jason-simmons's comment on Github&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="n"&gt;IconData&lt;/span&gt; &lt;span class="n"&gt;icon&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;AwesomeIcons&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;logo&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="o"&gt;...&lt;/span&gt;
&lt;span class="n"&gt;Text&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;String&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;fromCharCode&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;icon&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;codePoint&lt;/span&gt;&lt;span class="o"&gt;),&lt;/span&gt;
  &lt;span class="nl"&gt;style:&lt;/span&gt; &lt;span class="n"&gt;TextStyle&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;
    &lt;span class="nl"&gt;fontSize:&lt;/span&gt; &lt;span class="mf"&gt;24.0&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;fontFamily:&lt;/span&gt; &lt;span class="n"&gt;icon&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;fontFamily&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;package:&lt;/span&gt; &lt;span class="n"&gt;icon&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;fontPackage&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="o"&gt;),&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--WkbAFrwm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ia7h3t7g5l3ky1t3h3yx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--WkbAFrwm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ia7h3t7g5l3ky1t3h3yx.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;BTW, don't mess up the indentation of pubspec.yaml.&lt;br&gt;
There should be 2 indentations before &lt;code&gt;fonts:&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--R_P4QJ7s--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/673ey42n3c6sg581tn30.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--R_P4QJ7s--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/673ey42n3c6sg581tn30.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Hope this helps!
&lt;/h4&gt;

&lt;h4&gt;
  
  
  So proud to be a coder!
&lt;/h4&gt;

</description>
    </item>
    <item>
      <title>iPhone connects and disconnects from Mac</title>
      <dc:creator>idawnwon</dc:creator>
      <pubDate>Fri, 22 Jan 2021 13:51:30 +0000</pubDate>
      <link>https://dev.to/idawnwon/iphone-connects-and-disconnects-from-mac-1eo9</link>
      <guid>https://dev.to/idawnwon/iphone-connects-and-disconnects-from-mac-1eo9</guid>
      <description>&lt;p&gt;I am a big fan of &lt;strong&gt;Macbook Pro 15 inch (late 2015)&lt;/strong&gt;.&lt;br&gt;
Reasons are simple:&lt;br&gt;
&lt;strong&gt;Full ports&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Physical function keys&lt;/strong&gt;&lt;br&gt;
I own three of it.&lt;/p&gt;

&lt;p&gt;But they all drive me crazy on the same error:&lt;br&gt;
&lt;strong&gt;iPhone keeps charging and discharging when plugged into it.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Whichever cord, even a brand new lightning cord.&lt;br&gt;
Whichever macOS version, 10.12 - 10.15.&lt;br&gt;
Whichever iPhone, iPhone 6 - iPhone XS.&lt;br&gt;
Whichever iOS version, 9.0 - 14.0.&lt;/p&gt;

&lt;p&gt;I recognised it for so long, don't care it too much, until just now when I was compiling a flutter app to my iPhone for testing.&lt;/p&gt;

&lt;p&gt;Googled, found so many heart-broken big fans, also found a good solution.&lt;/p&gt;

&lt;p&gt;According to &lt;a href="https://discussions.apple.com/thread/8276949"&gt;this thread in Apple Communities&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Connect your iphone to your Mac.
&lt;/h4&gt;

&lt;h4&gt;
  
  
  Go to Activity Monitor --&amp;gt; Search for usbd --&amp;gt; Force quit it.
&lt;/h4&gt;

&lt;p&gt;or &lt;/p&gt;

&lt;h4&gt;
  
  
  Try terminal :
&lt;/h4&gt;

&lt;h4&gt;
  
  
  sudo killall -STOP -c usbd
&lt;/h4&gt;

&lt;p&gt;Worked for me.&lt;/p&gt;

&lt;p&gt;Also, someone say, &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You will not believe me, but I noticed that when my phone has more than 60% of the battery charge this problem is not exists anymore ... it's very strange, I checked several times ...&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Not in my case.&lt;/p&gt;

&lt;p&gt;By the way, Touch Bar is a gimmick, period.&lt;/p&gt;

&lt;h4&gt;
  
  
  Hope this helps!
&lt;/h4&gt;

&lt;h4&gt;
  
  
  So proud to be a coder!
&lt;/h4&gt;

</description>
    </item>
    <item>
      <title>Connect Wordpress API to Flutter</title>
      <dc:creator>idawnwon</dc:creator>
      <pubDate>Wed, 20 Jan 2021 05:46:17 +0000</pubDate>
      <link>https://dev.to/idawnwon/connect-wordpress-api-to-flutter-5al</link>
      <guid>https://dev.to/idawnwon/connect-wordpress-api-to-flutter-5al</guid>
      <description>&lt;p&gt;After explored WordPress, I found it is really an easy-to-use yet powerful CMS backend. I decided to use Flutter to develop a front-end, CRUD data directly from WordPress through API.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Configure "JWT Authentication for WP-API"
&lt;/h2&gt;

&lt;p&gt;This is a plugin for WordPress.&lt;/p&gt;

&lt;h4&gt;
  
  
  1.1 Search and Download "JWT Authentication for WP-API" in WordPress Plugin Market. (&lt;em&gt;DON'T&lt;/em&gt; activate it for now.)
&lt;/h4&gt;

&lt;h4&gt;
  
  
  1.2 Edit &lt;code&gt;.htaccess&lt;/code&gt; file, add lines below, between &lt;code&gt;&amp;lt;IfModule mod_rewrite.c&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;/IfModule&amp;gt;&lt;/code&gt; tag.
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;RewriteEngine on
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule ^(.*) - [E=HTTP_AUTHORIZATION:%1]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  1.3 Edit &lt;code&gt;wp-config.php&lt;/code&gt; file, add lines below, right after &lt;code&gt;define('AUTH_KEY', '...');define('SECURE_AUTH_KEY', '...');define('LOGGED_IN_KEY', '...');define('NONCE_KEY', '...');define('AUTH_SALT', '...');define('SECURE_AUTH_SALT', '...');define('LOGGED_IN_SALT', '...');define('NONCE_SALT', '...');&lt;/code&gt;
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;define('JWT_AUTH_SECRET_KEY', 'YOUR_KEY_HERE');
define('JWT_AUTH_CORS_ENABLE', true);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replace &lt;code&gt;'YOUR_KEY_HERE'&lt;/code&gt; with your key. Strongly recommend you to get one random key at &lt;a href="https://api.wordpress.org/secret-key/1.1/salt/" rel="noopener noreferrer"&gt;this trusted site&lt;/a&gt;. &lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F5w8039t6hxk60z81nlag.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F5w8039t6hxk60z81nlag.png" alt="Alt Text"&gt;&lt;/a&gt;Just copy anyone you like.&lt;/p&gt;
&lt;h4&gt;
  
  
  1.4 Activate "JWT Authentication for WP-API" in your WordPress panel.
&lt;/h4&gt;
&lt;h2&gt;
  
  
  2. Edit pubspec.yaml file
&lt;/h2&gt;

&lt;p&gt;This file locates in your flutter project folder.&lt;br&gt;
Add following lines under &lt;code&gt;dependencies:&lt;/code&gt; block:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;flutter_wordpress: ^0.2.0
flutter_html: ^1.1.0
url_launcher: ^5.7.10
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The version numbers are not constant. I googled each one's latest version on November 24, 2020. Maybe there would be newer versions at the time you are reading here.&lt;/p&gt;

&lt;p&gt;Thanks to &lt;a href="https://www.lynda.com/WordPress-tutorials/Challenge-Add-dynamic-related-posts-navigation/2822348/2967573-4.html?autoplay=true" rel="noopener noreferrer"&gt;Morten Rand-Hendriksen's tutorial on Lynda.com&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Hope this helps!
&lt;/h4&gt;

&lt;h4&gt;
  
  
  So proud to be a coder!
&lt;/h4&gt;

</description>
      <category>wordpress</category>
      <category>flutter</category>
    </item>
    <item>
      <title>Errors When Implementing Firebase in Flutter</title>
      <dc:creator>idawnwon</dc:creator>
      <pubDate>Wed, 20 Jan 2021 05:34:15 +0000</pubDate>
      <link>https://dev.to/idawnwon/errors-when-implementing-firebase-in-flutter-288m</link>
      <guid>https://dev.to/idawnwon/errors-when-implementing-firebase-in-flutter-288m</guid>
      <description>&lt;p&gt;I don't know why but implementing Firebase in Flutter seems painful. (Both are all Google products, they are expected to work like a pair, don't they? XD)&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;code&gt;CloudFirestorePlugin.java uses or overrides a deprecated API&lt;/code&gt;
&lt;/h4&gt;

&lt;p&gt;or&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;code&gt;Error running pod install&lt;/code&gt;
&lt;/h4&gt;

&lt;p&gt;or&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;code&gt;Specs satisfying the cloud_firestore (from .symlinks/plugins/cloud_firestore/ios) dependency were found, but they required a higher minimum deployment target.&lt;/code&gt;
&lt;/h4&gt;

&lt;p&gt;There are a lot solutions out there to deal with errors above. Here I wanna note down solutions in my case.&lt;/p&gt;

&lt;h2&gt;
  
  
  Development Environment
&lt;/h2&gt;

&lt;p&gt;MacOS: 10.15.7 (Catalina)&lt;br&gt;
Xcode: 12.2 (12B45b)&lt;br&gt;
Android Studio (AS): 4.1.2&lt;br&gt;
Flutter Plugin for AS: 52.2.1&lt;br&gt;
Dart Plugin for AS: 201.9317&lt;/p&gt;

&lt;h2&gt;
  
  
  Basic Setup
&lt;/h2&gt;

&lt;p&gt;Follow &lt;a href="https://www.youtube.com/watch?v=EXp0gq9kGxI&amp;amp;feature=emb_logo"&gt;Todd's video in Firebase official channel on Youtube&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This video is released on Dec 3, 2020.&lt;/p&gt;

&lt;p&gt;Follow it to do all the basic setup.&lt;/p&gt;

&lt;p&gt;Or follow &lt;a href="https://firebase.google.com/docs/flutter/setup"&gt;Firebase's official doc&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Compiling to Android emulator
&lt;/h2&gt;

&lt;p&gt;I met &lt;code&gt;CloudFirestorePlugin.java uses or overrides a deprecated API&lt;/code&gt; error, but still compiled successfully.&lt;/p&gt;

&lt;h4&gt;
  
  
  Solution:
&lt;/h4&gt;

&lt;p&gt;Quit the emulator, compile again, the error gone.&lt;/p&gt;

&lt;h2&gt;
  
  
  Compiling to iOS simulator
&lt;/h2&gt;

&lt;p&gt;I met &lt;code&gt;Error running pod install&lt;/code&gt; error. Also follows some detail like &lt;code&gt;Specs satisfying the 'cloud_firestore (from '.symlinks/plugins/cloud_firestore/ios')' dependency were found, but they required a higher minimum deployment target.&lt;/code&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Solution:
&lt;/h4&gt;

&lt;p&gt;In Android Studio:&lt;br&gt;
Click Tools -&amp;gt; Flutter -&amp;gt; Open iOS module in Xcode&lt;/p&gt;

&lt;p&gt;In Xcode:&lt;br&gt;
Click Runner -&amp;gt; General -&amp;gt; Deployment Info&lt;br&gt;
choose "iOS 10.0" instead of "iOS 9.0"&lt;/p&gt;

&lt;p&gt;Quit the simulator, compile again, the error gone.&lt;/p&gt;

&lt;p&gt;I hate to raise deployment target to 10.0, but according to &lt;a href="https://firebase.flutter.dev/docs/installation/ios/#ios-supported-versions"&gt;FlutterFire's official doc&lt;/a&gt;, 9.0 or lower are not accepted.&lt;/p&gt;

&lt;h4&gt;
  
  
  Hope this helps!
&lt;/h4&gt;

&lt;h4&gt;
  
  
  So proud to be a coder!
&lt;/h4&gt;

</description>
      <category>firebase</category>
      <category>flutter</category>
    </item>
    <item>
      <title>Execution failed for task ':app:mergeDexDebug'</title>
      <dc:creator>idawnwon</dc:creator>
      <pubDate>Wed, 02 Dec 2020 13:05:48 +0000</pubDate>
      <link>https://dev.to/idawnwon/execution-failed-for-task-app-mergedexdebug-5807</link>
      <guid>https://dev.to/idawnwon/execution-failed-for-task-app-mergedexdebug-5807</guid>
      <description>&lt;p&gt;After added &lt;code&gt;cloud_firestore: ^0.14.3+1&lt;/code&gt; (I am not quite sure if it is the only reason), run on Android emulator, failed, it saids &lt;code&gt;Execution failed for task ':app:mergeDexDebug'&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/FirebaseExtended/flutterfire/issues/2414#issuecomment-617706196"&gt;TahaTesser gives a hint&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You need to enable multidex&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://stackoverflow.com/a/60311131"&gt;lordvidex provided a solution&lt;/a&gt;:&lt;br&gt;
Go to &lt;code&gt;android/app/build.gradle&lt;/code&gt;, add the following lines of codes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="s"&gt;dependencies {&lt;/span&gt;
  &lt;span class="s"&gt;implementation 'com.android.support:multidex:1.0.3' //enter the latest version&lt;/span&gt;
&lt;span class="err"&gt;}&lt;/span&gt;
&lt;span class="s"&gt;android {&lt;/span&gt;
    &lt;span class="s"&gt;defaultConfig {&lt;/span&gt;
        &lt;span class="s"&gt;multiDexEnabled &lt;/span&gt;&lt;span class="no"&gt;true&lt;/span&gt;
    &lt;span class="s"&gt;}&lt;/span&gt;
&lt;span class="err"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run again, succeed.&lt;/p&gt;

&lt;p&gt;Hope this helps!&lt;br&gt;
So proud to be a coder!&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>androidstudio</category>
    </item>
    <item>
      <title>'Error running pod install' After Add cloud_firestore to Flutter</title>
      <dc:creator>idawnwon</dc:creator>
      <pubDate>Wed, 02 Dec 2020 12:26:21 +0000</pubDate>
      <link>https://dev.to/idawnwon/error-running-pod-install-after-add-cloudfirestore-to-flutter-5lj</link>
      <guid>https://dev.to/idawnwon/error-running-pod-install-after-add-cloudfirestore-to-flutter-5lj</guid>
      <description>&lt;h2&gt;
  
  
  Environment
&lt;/h2&gt;

&lt;p&gt;macOS: 10.15.7&lt;br&gt;
Xcode: 12.2, Build version 12B45b&lt;br&gt;
Android Studio: 4.1.1&lt;/p&gt;

&lt;p&gt;I made an app in Android Studio, it compiles fine. But a lot trouble happened after I add &lt;code&gt;cloud_firestore&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;
  
  
  The issue
&lt;/h3&gt;

&lt;p&gt;I added&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;firebase_core: ^0.5.2+1
firebase_auth: ^0.18.3+1
cloud_firestore: ^0.14.3+1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;to &lt;code&gt;pubspec.yaml&lt;/code&gt;, run app, it says &lt;code&gt;Error running pod install&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  1st try
&lt;/h2&gt;

&lt;p&gt;I thought it's maybe the versions issue, so I downgrade each one to&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;firebase_core: ^0.3.4
firebase_auth: ^0.8.4+4
cloud_firestore: ^0.9.13+1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Same issue.&lt;/p&gt;

&lt;h2&gt;
  
  
  2nd try
&lt;/h2&gt;

&lt;p&gt;Then I folloed &lt;a href="https://stackoverflow.com/a/64474526"&gt;Paresh Mangukiya's answer&lt;/a&gt; to try something further&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;### Open terminal, go to the project's folder&lt;/span&gt;
&lt;span class="nb"&gt;cd&lt;/span&gt; /ios
&lt;span class="nb"&gt;rm &lt;/span&gt;Podfile.lock
pod &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--repo-update&lt;/span&gt;
flutter clean
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  3rd try
&lt;/h2&gt;

&lt;p&gt;Then I add the three dependencies one by one.&lt;/p&gt;

&lt;p&gt;First added &lt;code&gt;firebase_core: ^0.5.2+1&lt;/code&gt;, run app in simulator, OK.&lt;br&gt;
Second added &lt;code&gt;firebase_auth: ^0.18.3+1&lt;/code&gt;, run app, it says&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Error: CocoaPods's specs repository is too out-of-date to satisfy dependencies.
To update the CocoaPods specs, run:
  pod repo update
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run &lt;code&gt;pod repo update&lt;/code&gt;, then run app again, OK.&lt;/p&gt;

&lt;h2&gt;
  
  
  4th try
&lt;/h2&gt;

&lt;p&gt;Next added &lt;code&gt;cloud_firestore: ^0.9.13+1&lt;/code&gt;, run app, it says &lt;code&gt;Error running pod install&lt;/code&gt; again, without any more info.&lt;/p&gt;

&lt;h2&gt;
  
  
  5th try
&lt;/h2&gt;

&lt;p&gt;Then I believe it's the problem of &lt;code&gt;cocoapods&lt;/code&gt; itself. I followed &lt;a href="https://superuser.com/a/686319"&gt;neilco's answer&lt;/a&gt; to fully uninstall cocoapods&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gem list &lt;span class="nt"&gt;--local&lt;/span&gt; | &lt;span class="nb"&gt;grep &lt;/span&gt;cocoapods
&lt;span class="nb"&gt;sudo &lt;/span&gt;gem uninstall EACH_OF_THEM
&lt;span class="nb"&gt;rm&lt;/span&gt; &lt;span class="nt"&gt;-rf&lt;/span&gt; ~/.cocoapods
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  6th try
&lt;/h2&gt;

&lt;p&gt;Then, I installed &lt;code&gt;homebrew&lt;/code&gt; and reinstalled &lt;code&gt;cocoapods&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install cocoapods
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  7th try
&lt;/h2&gt;

&lt;p&gt;After that, redo the steps&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;### Open terminal, go to the project's folder&lt;/span&gt;
&lt;span class="nb"&gt;cd&lt;/span&gt; /ios
&lt;span class="nb"&gt;rm &lt;/span&gt;Podfile.lock
pod &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--repo-update&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It stuck at &lt;code&gt;Installing BoringSSL-GRPC (0.0.7)&lt;/code&gt;. I waited about 1 hour, it still stuck there.&lt;/p&gt;

&lt;h2&gt;
  
  
  8th try
&lt;/h2&gt;

&lt;p&gt;After read &lt;a href="https://www.nstack.in/blog/grpc-ios-stuck/"&gt;Nitish Kumar Singh's post&lt;/a&gt;, I know &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;It downloads more than 1 GB of data when you Firebase(Firestore) to the Flutter Project. This is the reason why it took so long to finish.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;After about 3 hours, downloaded a bunch of dependencies&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;Installing BoringSSL-GRPC &lt;span class="o"&gt;(&lt;/span&gt;0.0.7&lt;span class="o"&gt;)&lt;/span&gt;
Installing Firebase &lt;span class="o"&gt;(&lt;/span&gt;6.33.0&lt;span class="o"&gt;)&lt;/span&gt;
Installing FirebaseAuth &lt;span class="o"&gt;(&lt;/span&gt;6.9.2&lt;span class="o"&gt;)&lt;/span&gt;
Installing FirebaseCore &lt;span class="o"&gt;(&lt;/span&gt;6.10.3&lt;span class="o"&gt;)&lt;/span&gt;
Installing FirebaseCoreDiagnostics &lt;span class="o"&gt;(&lt;/span&gt;1.7.0&lt;span class="o"&gt;)&lt;/span&gt;
Installing FirebaseFirestore &lt;span class="o"&gt;(&lt;/span&gt;1.18.0&lt;span class="o"&gt;)&lt;/span&gt;
Installing Flutter &lt;span class="o"&gt;(&lt;/span&gt;1.0.0&lt;span class="o"&gt;)&lt;/span&gt;
Installing GTMSessionFetcher &lt;span class="o"&gt;(&lt;/span&gt;1.5.0&lt;span class="o"&gt;)&lt;/span&gt;
Installing GoogleDataTransport &lt;span class="o"&gt;(&lt;/span&gt;7.5.1&lt;span class="o"&gt;)&lt;/span&gt;
Installing GoogleUtilities &lt;span class="o"&gt;(&lt;/span&gt;6.7.2&lt;span class="o"&gt;)&lt;/span&gt;
Installing PromisesObjC &lt;span class="o"&gt;(&lt;/span&gt;1.2.11&lt;span class="o"&gt;)&lt;/span&gt;
Installing abseil &lt;span class="o"&gt;(&lt;/span&gt;0.20200225.0&lt;span class="o"&gt;)&lt;/span&gt;
Installing cloud_firestore &lt;span class="o"&gt;(&lt;/span&gt;0.14.3-1&lt;span class="o"&gt;)&lt;/span&gt;
Installing firebase_auth &lt;span class="o"&gt;(&lt;/span&gt;0.18.3-1&lt;span class="o"&gt;)&lt;/span&gt;
Installing firebase_core &lt;span class="o"&gt;(&lt;/span&gt;0.5.2-1&lt;span class="o"&gt;)&lt;/span&gt;
Installing gRPC-C++ &lt;span class="o"&gt;(&lt;/span&gt;1.28.2&lt;span class="o"&gt;)&lt;/span&gt;
Installing gRPC-Core &lt;span class="o"&gt;(&lt;/span&gt;1.28.2&lt;span class="o"&gt;)&lt;/span&gt;
Installing leveldb-library &lt;span class="o"&gt;(&lt;/span&gt;1.22&lt;span class="o"&gt;)&lt;/span&gt;
Installing nanopb &lt;span class="o"&gt;(&lt;/span&gt;1.30906.0&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After a crazy &lt;code&gt;232.2s&lt;/code&gt; build time, run successfully.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Actually I am still not sure what caused the issue after all. But reinstall cocoapods helps in my case.&lt;/p&gt;

&lt;p&gt;Hope this helps!&lt;br&gt;
So proud to be a coder!&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>firebase</category>
      <category>androidstudio</category>
    </item>
    <item>
      <title>A Front-end Designer's Favourite Online Tools &amp; Resources</title>
      <dc:creator>idawnwon</dc:creator>
      <pubDate>Thu, 26 Nov 2020 12:38:45 +0000</pubDate>
      <link>https://dev.to/idawnwon/a-front-end-designer-s-favourite-online-tools-resources-1hck</link>
      <guid>https://dev.to/idawnwon/a-front-end-designer-s-favourite-online-tools-resources-1hck</guid>
      <description>&lt;h2&gt;
  
  
  Prototype
&lt;/h2&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://www.figma.com"&gt;Figma&lt;/a&gt;
&lt;/h4&gt;

&lt;h2&gt;
  
  
  Fonts
&lt;/h2&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://fonts.google.com"&gt;Google Fonts&lt;/a&gt;
&lt;/h4&gt;

&lt;h2&gt;
  
  
  App Icons Set Generator
&lt;/h2&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://appicon.co"&gt;Appicon&lt;/a&gt;
&lt;/h4&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://realfavicongenerator.net"&gt;Favicon&lt;/a&gt; (Thanks, &lt;a class="comment-mentioned-user" href="https://dev.to/maxivanov"&gt;@maxivanov&lt;/a&gt;
, for sharing this cool site!)
&lt;/h4&gt;

&lt;h2&gt;
  
  
  Flow Charts
&lt;/h2&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://app.diagrams.net"&gt;Diagrams&lt;/a&gt;
&lt;/h4&gt;

&lt;h2&gt;
  
  
  SVG Code Generator
&lt;/h2&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://jakearchibald.github.io/svgomg/"&gt;SVGOMG&lt;/a&gt;
&lt;/h4&gt;

&lt;h2&gt;
  
  
  Color, Icon, Palettes
&lt;/h2&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://www.materialpalette.com"&gt;Material Palette&lt;/a&gt;
&lt;/h4&gt;

&lt;h2&gt;
  
  
  Coding Playground
&lt;/h2&gt;

&lt;h4&gt;
  
  
  &lt;a href="http://codepen.io"&gt;Code Pen&lt;/a&gt;
&lt;/h4&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://codesandbox.io"&gt;Code Sandbox&lt;/a&gt;
&lt;/h4&gt;

&lt;h2&gt;
  
  
  Key Generator
&lt;/h2&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://api.wordpress.org/secret-key/1.1/salt/"&gt;WordPress Salts&lt;/a&gt;
&lt;/h4&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://www.uuidgenerator.net"&gt;UUID Generator&lt;/a&gt;
&lt;/h4&gt;

&lt;h2&gt;
  
  
  Knowledge Base
&lt;/h2&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://www.lynda.com"&gt;Lynda&lt;/a&gt;
&lt;/h4&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://developer.mozilla.org"&gt;Mozilla&lt;/a&gt;
&lt;/h4&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://css-tricks.com"&gt;CSS-TRICKS&lt;/a&gt;
&lt;/h4&gt;

&lt;h2&gt;
  
  
  Images, Vectors, Icons Stock
&lt;/h2&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://icons8.com/illustrations"&gt;Icons8 OUCH&lt;/a&gt;
&lt;/h4&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://unsplash.com"&gt;Unsplash&lt;/a&gt;
&lt;/h4&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://www.pexels.com"&gt;Pexels&lt;/a&gt;
&lt;/h4&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://icomoon.io/"&gt;IcoMoon&lt;/a&gt;
&lt;/h4&gt;

</description>
    </item>
    <item>
      <title>sudo gem install cocoapods failed</title>
      <dc:creator>idawnwon</dc:creator>
      <pubDate>Wed, 25 Nov 2020 13:51:17 +0000</pubDate>
      <link>https://dev.to/idawnwon/sudo-gem-install-cocoapods-failed-5fai</link>
      <guid>https://dev.to/idawnwon/sudo-gem-install-cocoapods-failed-5fai</guid>
      <description>&lt;h4&gt;
  
  
  Environment:
&lt;/h4&gt;

&lt;p&gt;macOS: 10.15.7&lt;br&gt;
Xcode: 12.2, Build version 12B45b&lt;br&gt;
Android Studio: 4.1.1&lt;/p&gt;

&lt;h4&gt;
  
  
  Process:
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Test drive the demo flutter application, run on iOS simulator, everything goes well.&lt;/li&gt;
&lt;li&gt;Added some dependencies in pub file, Android Studio throw errors and suggest me to &lt;code&gt;sudo gem install cocoapods&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Tried this command, failed, error log saids, &lt;code&gt;Failed to build gem native extension...&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;According to &lt;a href="https://github.com/CocoaPods/CocoaPods/issues/9538#issuecomment-586581623"&gt;MahmoudKhaled's answer&lt;/a&gt;, tried these commands, error occurred, &lt;code&gt;Error running 'requirements_osx_brew_libs_install autoconf automake libtool pkg-config coreutils libyaml libksba readline zlib openssl@1.1'&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;According to &lt;a href="https://stackoverflow.com/a/58226876"&gt;joki's answer&lt;/a&gt;, tried these commands:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo xcode-select --switch /Library/Developer/CommandLineTools
ruby -rrbconfig -e 'puts RbConfig::CONFIG["rubyhdrdir"]'
sudo xcode-select --switch /Applications/Xcode.app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Suggestion:
&lt;/h4&gt;

&lt;p&gt;I strongly recommend you to read &lt;a href="https://stackoverflow.com/a/58226876"&gt;joki's answer&lt;/a&gt;. Inspired me a lot!&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>dart</category>
    </item>
    <item>
      <title>"Failed to install the following Android SDK packages..." When Building Android App on Android Studio</title>
      <dc:creator>idawnwon</dc:creator>
      <pubDate>Mon, 23 Nov 2020 05:25:39 +0000</pubDate>
      <link>https://dev.to/idawnwon/failed-to-install-the-following-android-sdk-packages-when-building-android-app-on-android-studio-4l70</link>
      <guid>https://dev.to/idawnwon/failed-to-install-the-following-android-sdk-packages-when-building-android-app-on-android-studio-4l70</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Failed to install the following Android SDK packages as some licences have not been accepted.
     platforms;android-26 Android SDK Platform 26
     build-tools;28.0.3 Android SDK Build-Tools 28.0.3
  To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  If it prompts like this above, try:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# macOS:&lt;/span&gt;
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;JAVA_HOME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/Applications/Android&lt;span class="se"&gt;\ &lt;/span&gt;Studio.app/Contents/jre/jdk/Contents/Home
&lt;span class="nb"&gt;yes&lt;/span&gt; | ~/Library/Android/sdk/tools/bin/sdkmanager &lt;span class="nt"&gt;--licenses&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For GNU/Linux Distributions, Windows, refer to &lt;a href="https://stackoverflow.com/a/55641042"&gt;Felix Too's answer on Stack overflow&lt;/a&gt;&lt;/p&gt;

</description>
      <category>android</category>
    </item>
    <item>
      <title>Git | Discard The Local Changes</title>
      <dc:creator>idawnwon</dc:creator>
      <pubDate>Mon, 16 Nov 2020 10:08:48 +0000</pubDate>
      <link>https://dev.to/idawnwon/git-discard-the-local-changes-bi1</link>
      <guid>https://dev.to/idawnwon/git-discard-the-local-changes-bi1</guid>
      <description>&lt;p&gt;git reset --hard&lt;/p&gt;

</description>
      <category>git</category>
      <category>github</category>
    </item>
  </channel>
</rss>
