2

flutter run fails with gradle. Posting answer as this helped Issue related to gradle build.

John Ravi
  • 1,190
  • 1
  • 12
  • 21

1 Answers1

13

Answer from:

This is a problem with an old version of the Android Gradle plugin that only surfaced recently due to mips support being removed from the Android SDK. As stated above, it has nothing to do with the filament project.

Solution

Without downloading, updating, or copying anything, you can "fix" the error by simply creating an empty directory where the old version expects it.

Linux

mkdir -p $ANDROID_HOME/ndk-bundle/toolchains/mips64el-linux-android/prebuilt/linux-x86_64

MacOS

mkdir -p $ANDROID_HOME/ndk-bundle/toolchains/mips64el-linux-android/prebuilt/darwin-x86_64

Windows

mkdir %ANDROID_HOME%\ndk-bundle\toolchains\mips64el-linux-android\prebuilt\windows-x86_64

The ANDROID_HOME environment variable points to the root of the Android SDK installation.

HoldOffHunger
  • 18,769
  • 10
  • 104
  • 133
John Ravi
  • 1,190
  • 1
  • 12
  • 21
  • 2
    Not sure why you got so downvoted. Googled/SO'd several answers to this question - going around in circles on how to update the Android Gradle plugin, this is janky but at least allows me to move forward. TY. – Casey L Oct 31 '18 at 15:21
  • Unbelievable. While it certainly doesn't fix the toolchain per say, it surely fixes the error. Works for Ionic as well. – SwiftArchitect Nov 29 '18 at 03:26