Flutter: Difference between revisions

Bme (talk | contribs)
Added a trouble shooting section
Bme (talk | contribs)
mNo edit summary
Line 111: Line 111:
== Troubleshooting ==
== Troubleshooting ==


* The default Gradle template for android captures the Android and Flutter SDK paths in <code>android/local.properties</code> preventing future updates to the SDK from participating in the build. This manifests itself as Gradle failing to install SDK components registered in the shell. To fix, simply delete the properties file and run the build again.
* The default Gradle template for android captures the Android and Flutter SDK paths in <code>android/local.properties</code> preventing future updates to the SDK from participating in the build. This manifests itself as Gradle failing to install SDK components registered in the shell. To fix, simply delete the properties file and run the build again.<syntaxhighlight lang="shell-session">
FAILURE: Build failed with an exception.
 
* Where:
Build file '/xxx/android/build.gradle.kts' line: 16
 
* What went wrong:
A problem occurred configuring project ':app'.
> com.android.builder.sdk.InstallFailedException: Failed to install the following SDK components:
      ndk;26.3.11579264 NDK (Side by side) 26.3.11579264
  The SDK directory is not writable (/nix/store/1xw5npxd7isrl50pl7y82anhdapnfs6p-androidsdk/libexec/android-sdk)
</syntaxhighlight>


== See also ==
== See also ==