Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Execution failed for task ':app:stripDebugDebugSymbols' in flutter

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

like image 399
Archit Dandavate Avatar asked Jul 05 '21 05:07

Archit Dandavate


People also ask

How to fix execution FAILED for Task': app stripDebugDebugSymbols?

The error is most likely due to the NDK library not being installed on the latest iOS version. Adding the latest version of Xcode will fix the error. You can also remove the DeviceSupport folder. After that, you can continue building the app using any Flutter version.

How do I know what version of NDK I have?

Go to Tools->SDK Manager (or Files->Settings->Appearance & Behavior->System Settings->Android SDK ). Then select the SDK Tools tab, and check the Show Package Details checkbox. You will see your NDK version.


4 Answers

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.

like image 197
Devplanet Avatar answered Oct 17 '22 02:10

Devplanet


You can resolve this issue by the following steps,

  1. In build.gradle file add ndkVersion

    android {
         ...
         ndkVersion '21.1.6528147'
    }
    
  2. 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.

  1. 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.

  2. Delete all contents of that directory.

  3. Restart the IDE.

enter image description here

like image 21
Codemaker Avatar answered Oct 17 '22 02:10

Codemaker


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

like image 29
fahis up Avatar answered Oct 17 '22 01:10

fahis up


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

Show hidden folder

Show hidden folder 2

Path folder

Website image

like image 2
DL Studio Avatar answered Oct 17 '22 02:10

DL Studio