Hey developers I am new in flutter development I installed ndk
, but at time of making build it show exception in debug console.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':rive_common'.
> [CXX1102] Location specified by ndk.dir (C:\androidSDK\ndk\28.0.13004108) did not contain a valid NDK and couldn't be used
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at .
BUILD FAILED in 5s
Error: Gradle task assembleDebug failed with exit code 1
Exited (1).
I want to flutter app on andriod on windows.
Hey developers I am new in flutter development I installed ndk
, but at time of making build it show exception in debug console.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':rive_common'.
> [CXX1102] Location specified by ndk.dir (C:\androidSDK\ndk\28.0.13004108) did not contain a valid NDK and couldn't be used
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle..
BUILD FAILED in 5s
Error: Gradle task assembleDebug failed with exit code 1
Exited (1).
I want to flutter app on andriod on windows.
Share Improve this question edited 1 hour ago dthorbur 1,0493 gold badges13 silver badges25 bronze badges asked 23 hours ago najeeb hassannajeeb hassan 213 bronze badges New contributor najeeb hassan is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.1 Answer
Reset to default 0Verify NDK Installation:
Go to C:\androidSDK\ndk\28.0.13004108 and check if the necessary files exist (ndk-build, toolchains, build directories).
If you have multiple NDK versions installed, try specifying another one:
Open android/gradle.properties and add:
android.ndkVersion=25.2.9519653
(Replace 25.2.9519653 with an installed version from C:\androidSDK\ndk)
Or in android/app/build.gradle:
android {
ndkVersion "25.2.9519653"
}
Check installed NDK versions:
ls C:\androidSDK\ndk\
If Using Flutter with an Old Gradle Version Update your android/gradle/wrapper/gradle-wrapper.properties:
distributionUrl=https\://services.gradle./distributions/gradle-8.0-all.zip