Execution failed for task ':app:stripDebugDebugSymbols' in flutter
Solution 1
Go inside your SDK
location and find the directory called ndk then delete the content inside that directory. Then build the app again. Probably the ndk version has corrupted and Android Studio will replace it with the latest.
Solution 2
You can resolve this issue by the following steps,
-
In build.gradle file add
ndkVersion
android { ... ndkVersion '21.1.6528147' }
-
In local.properties remove
ndk.dir
ndk.dir=~/Library/Android/sdk/ndk-bundle
If still issue occurs then you have to remove the ndk folder from your machine.
-
Take you run command window (Win + R) and type
%USERPROFILE%\AppData\Local\Android\SDK
. Or you can type the same in the file explorer address bar, then open the ndk folder from there. If you installed ndk in a different directory, then open that folder. -
Delete all contents of that directory.
-
Restart the IDE.
Solution 3
1.In your Android studio project change ndk version 2.Go to android>app>build.gradle
3.Add ndkVersion "add your ndk version number" ndk version
Solution 4
1. From your PC set Show hidden files.
2. Go to C:\Users\NameOfPC\AppData\Local\Android\Sdk\ndk
3. Delete all the files inside the folder named 21.1.6352462 it depends on what number you are getting error, it might be 22 or 23 etc. (This is the Version of android) 21 is for Lollipop.
4. Download and choose file from here - Choose what version you are getting error. Example android-ndk-r21e-windows-x86_64.zip
5. Extract the file inside folder named 21.1.6352462
6 And run the IDE again.
Image Refence below
Comments
-
Archit Dandavate almost 2 years
When I am trying to run my flutter app on a device my build fails to give this error
Execution failed for task ':app:stripDebugDebugSymbols'. NDK at C:\Users\User\AppData\Local\Android\sdk\ndk-bundle did not have a source.properties file
I have ndk version 23.0.7421159rc5 installed. Here's the result of flutter doctor
[√] Flutter (Channel stable, 2.0.5, on Microsoft Windows [Version 10.0.19042.985], locale en-US) [√] Android toolchain - develop for Android devices (Android SDK version 30.0.3) [√] Chrome - develop for the web [!] Android Studio (version 4.0) X Unable to find bundled Java version. [√] Android Studio (version 4.1.0) [√] VS Code (version 1.57.1) [√] Connected device (3 available)
Please help to resolve the issue