{"id":108,"date":"2025-04-24T11:41:28","date_gmt":"2025-04-24T11:41:28","guid":{"rendered":"https:\/\/documentation.iqonic.design\/vizion-ai\/?p=108"},"modified":"2025-06-25T04:06:11","modified_gmt":"2025-06-25T04:06:11","slug":"linux-build-failed-with-an-exception","status":"publish","type":"post","link":"https:\/\/documentation.iqonic.design\/vizion-ai\/linux-build-failed-with-an-exception\/","title":{"rendered":"Linux Build failed with an exception"},"content":{"rendered":"<div class=\"nolwrap\">\n<pre class=\"wp-block-preformatted\">Estimated reading: 2 minutes<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>C++ Compilation Errors during Android ARM64 Build on Linux<\/strong><\/h2>\n\n\n\n<p>You might encounter this kind of build error if your Flutter SDK is installed via snap.<\/p>\n\n\n\n<p>See the image below<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1472\" height=\"688\" src=\"https:\/\/documentation.iqonic.design\/vizion-ai\/wp-content\/uploads\/sites\/11\/2025\/04\/Linux_Build_failed1.png\" alt=\"\" class=\"wp-image-427\" \/><\/figure>\n\n\n\n<p>If you encounter Build Errors during Android ARM64 Build on Linux then,<\/p>\n\n\n\n<p>Follow these steps to resolve the compilation errors:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Download New Flutter SDK: Obtain the latest version of the Flutter SDK from the official Git repository.&nbsp;<a href=\"https:\/\/docs.flutter.dev\/release\/archive?tab=linux\" target=\"_blank\" rel=\"noreferrer noopener\">Click here to download Flutter SDK<\/a><\/li>\n\n\n\n<li>Extract the downloaded SDK.<\/li>\n\n\n\n<li>Update the system environment variables to include the path to the new Flutter SDK.<br><a href=\"https:\/\/documentation.iqonic.design\/vizion-ai\/common-errors\/linux-build-failed-with-an-exception\">How to Set Path to Environment in Linux<\/a><\/li>\n\n\n\n<li>This ensures that the updated SDK is used during the build process.<\/li>\n\n\n\n<li>Open your IDE\n<ul class=\"wp-block-list\">\n<li>If you are using Android Studio, then follow the steps below &#8211;\n<ul class=\"wp-block-list\">\n<li>Go To File \u2192 Settings \u2192 Languages &amp; Frameworks \u2192 Flutter<\/li>\n\n\n\n<li>Check that your installed sdk is from snap or git<\/li>\n\n\n\n<li>If your Flutter SDK path looks like this: &#8216;.\/snap\/flutter\/common\/flutter&#8217;, then replace it with the Flutter SDK path that you downloaded from Git<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1513\" height=\"830\" src=\"https:\/\/documentation.iqonic.design\/vizion-ai\/wp-content\/uploads\/sites\/11\/2025\/04\/Linux_Build_failed2.png\" alt=\"\" class=\"wp-image-428\" \/><\/figure>\n\n\n\n<p>After setting the path, attempt to rebuild the project to see if the compilation errors are resolved<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Add Flutter SDK Path to System Environment in Linux<\/strong><\/h2>\n\n\n\n<p>Follow these steps to add the Flutter SDK path to the system environment in Linux:<\/p>\n\n\n\n<p>Step 1 &#8211; Open a terminal on your Linux system.<\/p>\n\n\n\n<p>Step 2 &#8211; Locate Flutter SDK Path<\/p>\n\n\n\n<p>Determine the path where you have extracted the Flutter SDK on your system.<\/p>\n\n\n\n<p>Step 3 &#8211; Edit&nbsp;<code>.bashrc<\/code>&nbsp;or&nbsp;<code>.bash_profile<\/code><\/p>\n\n\n\n<p>Depending on your Linux distribution and configuration, you need to edit either the&nbsp;<code>.bashrc<\/code>&nbsp;or&nbsp;<code>.bash_profile<\/code>&nbsp;file in your home directory.<br>Use a text editor like nano or vim.<\/p>\n\n\n\n<p>For example:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">nano ~\/.bashrc<\/pre>\n\n\n\n<p>or<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">nano ~\/.bash_profile<\/pre>\n\n\n\n<p>Step 4 &#8211; Add Export Statement<\/p>\n\n\n\n<p>Inside the file, add an export statement to set the&nbsp;<code>PATH<\/code>&nbsp;environment variable to include the Flutter SDK path.<\/p>\n\n\n\n<p>For example:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">export PATH=\"$PATH:\/path\/to\/flutter\/bin\"<\/pre>\n\n\n\n<p>Replace&nbsp;<code>\/path\/to\/flutter<\/code>&nbsp;with the actual path to your Flutter SDK directory.<\/p>\n\n\n\n<p>Step 5 &#8211; Save and Close the File:<\/p>\n\n\n\n<p>After adding the export statement, save the changes and close the text editor.<\/p>\n\n\n\n<p>Step 6 &#8211; Reload&nbsp;<code>.bashrc<\/code>&nbsp;or&nbsp;<code>.bash_profile<\/code>:<\/p>\n\n\n\n<p>To apply the changes immediately, you can either close and reopen the terminal or run the<\/p>\n\n\n\n<p>following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">source ~\/.bashrc<\/pre>\n\n\n\n<p>or<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">source ~\/.bash_profile<\/pre>\n\n\n\n<p>Step 7 &#8211; Verify Flutter SDK path<\/p>\n\n\n\n<p>To verify that the Flutter SDK path has been added to the system environment, you can run:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">  echo $PATH<br> ```<br>This command will display the current value of the `PATH` environment variable, and you should see the Flutter SDK path included in the output.<\/pre>\n\n\n\n<p><\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>Estimated reading: 2 minutes C++ Compilation Errors during Android ARM64 Build on Linux You might encounter this kind of build error if your Flutter SDK is installed via snap. See the image below If you encounter Build Errors during Android ARM64 Build on Linux then, Follow these steps to resolve the compilation errors: After setting [&hellip;]<\/p>\n","protected":false},"author":11,"featured_media":0,"parent":100,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-108","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"featured_image_src":null,"author_info":{"display_name":"laraveladminiq","author_link":"https:\/\/documentation.iqonic.design\/vizion-ai\/author\/laraveladminiq\/"},"children":[],"_links":{"self":[{"href":"https:\/\/documentation.iqonic.design\/vizion-ai\/wp-json\/wp\/v2\/posts\/108","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/documentation.iqonic.design\/vizion-ai\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/documentation.iqonic.design\/vizion-ai\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/documentation.iqonic.design\/vizion-ai\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/documentation.iqonic.design\/vizion-ai\/wp-json\/wp\/v2\/comments?post=108"}],"version-history":[{"count":5,"href":"https:\/\/documentation.iqonic.design\/vizion-ai\/wp-json\/wp\/v2\/posts\/108\/revisions"}],"predecessor-version":[{"id":541,"href":"https:\/\/documentation.iqonic.design\/vizion-ai\/wp-json\/wp\/v2\/posts\/108\/revisions\/541"}],"up":[{"embeddable":true,"href":"https:\/\/documentation.iqonic.design\/vizion-ai\/wp-json\/wp\/v2\/posts\/100"}],"wp:attachment":[{"href":"https:\/\/documentation.iqonic.design\/vizion-ai\/wp-json\/wp\/v2\/media?parent=108"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/documentation.iqonic.design\/vizion-ai\/wp-json\/wp\/v2\/categories?post=108"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/documentation.iqonic.design\/vizion-ai\/wp-json\/wp\/v2\/tags?post=108"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}