Flutter run build ndk not found macbook m1

I just got a new Macbook M1, and I tried to build the app using flutter on iOS and Android. And I got a some issues that I need to solve. And there's an issue that I cannot find on the internet that I want to share with you.

It's actually a simple solution but it's really important for you guys that want to build the android app on PlayStore. Because if you don't fix this issue, you cannot build the app actually. It takes me a few hours to fix the issue. That's why I want to share this with you all, so it saves you a lot of time.

So Basically you need create local.properties inside android folder. And define these properties so Android can know where exactly the ndk. After I inserted these properties, now I can run the app on Android just fine.

sdk.dir=/Users/username/Library/Android/sdk
ndk.dir=/Users/username/Library/Android/sdk/ndk/23.1.7779620
flutter.sdk=/Users/username/development/flutter
flutter.buildMode=debug
flutter.versionName=1.0.2
flutter.versionCode=13

So you need to change the username according to your username. I think that's all that you need to do to fix the issue ndk not found on your mac m1. I hope it can help you to solve the problem. See you on the next post. Have a great day.

If you have any question, please feel free to ask on these comment. If I had time I'm gonna answer all of your questions. Thank You.

Popular posts from this blog

How to have ConstraintLayout inside ScrollView and ScrollView inside ConstraintLayout Android

Missing system image Android Studio solution

Fixing Keyboard Hide When Reload UITableview iOS swift 5