1
  • I have created a simple app.

  • I choose one of my android emulator to start.

  • The emulator started and appear successfully.

  • Then I choose "run without debugging"

  • It will say nothing and suddenly closed. But my emulator still open without starting the app.

  • Then I try with terminal and "flutter run"

  • After seconds it say this error to me.


FAILURE: Build failed with an exception.

* Where:

Build file 'G:\github\Unveil_Entertainment\Unveil\unveil_flutter\android\build.gradle.kts' line: 16

* What went wrong:

A problem occurred configuring project ':app'.

\> [CXX1101] NDK at C:\Users\Hp User\AppData\Local\Android\Sdk\ndk\26.3.11579264 did not have a source.properties file

* 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.org.

BUILD FAILED in 1s

Running Gradle task 'assembleDebug'... 2,237ms

Error: Gradle task assembleDebug failed with exit code 1

  • After that I installed NDK from android studio also.
  • But still the same error
  • What I have to do now?

***This error only getting when I choose android emulator to run my App, When I choose Edge browser to run app it will run very much successfully. But I want to try this with my android emulator.

3
  • don't upload images of error read meta.stackoverflow.com/a/285557/14466860 instead attach it as a text. Commented Apr 10 at 4:36
  • Sure, i have posted the error mes by Text Commented Apr 10 at 4:48
  • Edited the post with adding error message as a text instead of adding image Commented Apr 10 at 4:58

2 Answers 2

0

It seems that the emulator you tried to access is using the incorrect NDK version, if you did updated the gradle there are three ways that you can do.

  1. If you go to the Settings -> Languages & Frameworks -> SDK Tools -> There will be a checkbox options says "Show Packages", it will display all the version of the NDK(Side by side), if you haven't installed the NDK in general, it would be preferable to check it and install it. otherwise it will display all the version that your application is needed.

  2. In gradle within the android/app/build.gradle package, there is a android block is the ndkVersion, by default it should the flutter ndk version, but you can manually change it into a string type of the version.

Hope this brings to the solution you seek.

Sign up to request clarification or add additional context in comments.

1 Comment

I have already done these two options. But the issue is still
0

It seems that the incorrect NDK version issue, its occurs when you updated the gradle file so in my case i updated manually NDK version like below and it works

ndkVersion = "25.1.8937393"

hope it helps!

1 Comment

Where I have to update NDK version?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.