Problem with Android NDK and running preview on Android

when launching the apk build, an error occurred that occurred suddenly before everything was working. accepting licenses doesn’t help. The android emulator also stopped running, and the emulator 5554 and localhost 5555 disappeared. The ADB commands also don’t help. when trying to install any NDK, XML parsing errors occur.

2025-02-06T07:40:04Z [android] Flutter daemon started

2025-02-06T07:40:05Z [android] No supported devices found with name or id matching ‘localhost:5555’.

2025-02-06T07:40:05Z [android] The following devices were found:

2025-02-06T07:40:05Z [android] Linux (desktop) • linux • linux-x64 • IDX GNU/Linux 6.1.112+

2025-02-06T07:40:05Z [android] ✘ Preview failed to start

Checking the license for package NDK (Side by side) 26.3.11579264 in /nix/store/gvspaq4wcw58ld00ygansidsb3akpkpw-android-sdk-platform-tools-34.0.5/libexec/android-sdk/licenses
Warning: License for package NDK (Side by side) 26.3.11579264 not accepted.

FAILURE: Build failed with an exception.

  • Where:
    Build file ‘/home/user/myapp/android/build.gradle’ line: 13

  • What went wrong:
    A problem occurred evaluating root project ‘android’.

A problem occurred configuring project ‘:app’.
com.android.builder.sdk.LicenceNotAcceptedException: Failed to install the following Android SDK packages as some licences have not been accepted.
ndk;26.3.11579264 NDK (Side by side) 26.3.11579264
To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.
All licenses can be accepted using the sdkmanager command line tool:
sdkmanager.bat --licenses
Or, to transfer the license agreements from one workstation to another, see Update the IDE and SDK tools  |  Android Studio  |  Android Developers

 Using Android SDK: /nix/store/gvspaq4wcw58ld00ygansidsb3akpkpw-android-sdk-platform-tools-34.0.5/libexec/android-sdk
  • 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 ‘assembleRelease’… 1,428ms
Gradle task assembleRelease failed with exit code 1

help me please.

1 Like

Thank for sharing great news